(self)
| 981 | self.assertEqual(p, c.port) |
| 982 | |
| 983 | def test_response_headers(self): |
| 984 | # test response with multiple message headers with the same field name. |
| 985 | text = ('HTTP/1.1 200 OK\r\n' |
| 986 | 'Set-Cookie: Customer="WILE_E_COYOTE"; ' |
| 987 | 'Version="1"; Path="/acme"\r\n' |
| 988 | 'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";' |
| 989 | ' Path="/acme"\r\n' |
| 990 | '\r\n' |
| 991 | 'No body\r\n') |
| 992 | hdr = ('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"' |
| 993 | ', ' |
| 994 | 'Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"') |
| 995 | s = FakeSocket(text) |
| 996 | r = client.HTTPResponse(s) |
| 997 | r.begin() |
| 998 | cookies = r.getheader("Set-Cookie") |
| 999 | self.assertEqual(cookies, hdr) |
| 1000 | |
| 1001 | def test_read_head(self): |
| 1002 | # Test that the library doesn't attempt to read any data |
nothing calls this directly
no test coverage detected