(self)
| 935 | self.assertEqual(p, c.port) |
| 936 | |
| 937 | def test_response_headers(self): |
| 938 | # test response with multiple message headers with the same field name. |
| 939 | text = ('HTTP/1.1 200 OK\r\n' |
| 940 | 'Set-Cookie: Customer="WILE_E_COYOTE"; ' |
| 941 | 'Version="1"; Path="/acme"\r\n' |
| 942 | 'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";' |
| 943 | ' Path="/acme"\r\n' |
| 944 | '\r\n' |
| 945 | 'No body\r\n') |
| 946 | hdr = ('Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"' |
| 947 | ', ' |
| 948 | 'Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"') |
| 949 | s = FakeSocket(text) |
| 950 | r = client.HTTPResponse(s) |
| 951 | r.begin() |
| 952 | cookies = r.getheader("Set-Cookie") |
| 953 | self.assertEqual(cookies, hdr) |
| 954 | |
| 955 | def test_read_head(self): |
| 956 | # Test that the library doesn't attempt to read any data |
nothing calls this directly
no test coverage detected