(self)
| 920 | |
| 921 | class TestHttpRequest(unittest.TestCase): |
| 922 | def test_unicode(self): |
| 923 | http = HttpMock(datafile("zoo.json"), headers={"status": "200"}) |
| 924 | model = JsonModel() |
| 925 | uri = "https://www.googleapis.com/someapi/v1/collection/?foo=bar" |
| 926 | method = "POST" |
| 927 | request = HttpRequest( |
| 928 | http, |
| 929 | model.response, |
| 930 | uri, |
| 931 | method=method, |
| 932 | body="{}", |
| 933 | headers={"content-type": "application/json"}, |
| 934 | ) |
| 935 | request.execute() |
| 936 | self.assertEqual(uri, http.uri) |
| 937 | self.assertEqual(str, type(http.uri)) |
| 938 | self.assertEqual(method, http.method) |
| 939 | self.assertEqual(str, type(http.method)) |
| 940 | |
| 941 | def test_empty_content_type(self): |
| 942 | """Test for #284""" |
nothing calls this directly
no test coverage detected