(self)
| 1206 | self.assertRaises(BatchError, batch._header_to_id, "<foo>") |
| 1207 | |
| 1208 | def test_serialize_request(self): |
| 1209 | batch = BatchHttpRequest() |
| 1210 | request = HttpRequest( |
| 1211 | None, |
| 1212 | None, |
| 1213 | "https://www.googleapis.com/someapi/v1/collection/?foo=bar", |
| 1214 | method="POST", |
| 1215 | body="{}", |
| 1216 | headers={"content-type": "application/json"}, |
| 1217 | methodId=None, |
| 1218 | resumable=None, |
| 1219 | ) |
| 1220 | s = batch._serialize_request(request).splitlines() |
| 1221 | self.assertEqual(EXPECTED.splitlines(), s) |
| 1222 | |
| 1223 | def test_serialize_request_media_body(self): |
| 1224 | batch = BatchHttpRequest() |
nothing calls this directly
no test coverage detected