mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	httplib test for early eof response. related to Issue13684
This commit is contained in:
		
							parent
							
								
									285e51b7e0
								
							
						
					
					
						commit
						9c29f86a81
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		|  | @ -369,6 +369,15 @@ def test_overflowing_chunked_line(self): | |||
|         resp.begin() | ||||
|         self.assertRaises(client.LineTooLong, resp.read) | ||||
| 
 | ||||
|     def test_early_eof(self): | ||||
|         # Test httpresponse with no \r\n termination, | ||||
|         body = "HTTP/1.1 200 Ok" | ||||
|         sock = FakeSocket(body) | ||||
|         resp = client.HTTPResponse(sock) | ||||
|         resp.begin() | ||||
|         self.assertEqual(resp.read(), b'') | ||||
|         self.assertTrue(resp.isclosed()) | ||||
| 
 | ||||
| class OfflineTest(TestCase): | ||||
|     def test_responses(self): | ||||
|         self.assertEqual(client.responses[client.NOT_FOUND], "Not Found") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Senthil Kumaran
						Senthil Kumaran