mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	fixes 813986
This commit is contained in:
		
							parent
							
								
									bf138333ce
								
							
						
					
					
						commit
						1a41313684
					
				
					 2 changed files with 16 additions and 0 deletions
				
			
		|  | @ -134,8 +134,19 @@ def RobotTest(index, robots_txt, good_urls, bad_urls, | |||
| 
 | ||||
| RobotTest(7, doc, good, bad) | ||||
| 
 | ||||
| class TestCase(unittest.TestCase): | ||||
|     def runTest(self): | ||||
|         test_support.requires('network') | ||||
|         # whole site is password-protected. | ||||
|         url = 'http://mueblesmoraleda.com' | ||||
|         parser = robotparser.RobotFileParser() | ||||
|         parser.set_url(url) | ||||
|         parser.read() | ||||
|         self.assertEqual(parser.can_fetch("*", url+"/robots.txt"), False) | ||||
| 
 | ||||
| def test_main(): | ||||
|     test_support.run_unittest(tests) | ||||
|     TestCase().run() | ||||
| 
 | ||||
| if __name__=='__main__': | ||||
|     test_support.Verbose = 1 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Skip Montanaro
						Skip Montanaro