(self)
| 1329 | self.assertEqual(None, ret) |
| 1330 | |
| 1331 | def test_execute(self): |
| 1332 | batch = BatchHttpRequest() |
| 1333 | callbacks = Callbacks() |
| 1334 | |
| 1335 | batch.add(self.request1, callback=callbacks.f) |
| 1336 | batch.add(self.request2, callback=callbacks.f) |
| 1337 | http = HttpMockSequence( |
| 1338 | [ |
| 1339 | ( |
| 1340 | { |
| 1341 | "status": "200", |
| 1342 | "content-type": 'multipart/mixed; boundary="batch_foobarbaz"', |
| 1343 | }, |
| 1344 | BATCH_RESPONSE, |
| 1345 | ) |
| 1346 | ] |
| 1347 | ) |
| 1348 | batch.execute(http=http) |
| 1349 | self.assertEqual({"foo": 42}, callbacks.responses["1"]) |
| 1350 | self.assertEqual(None, callbacks.exceptions["1"]) |
| 1351 | self.assertEqual({"baz": "qux"}, callbacks.responses["2"]) |
| 1352 | self.assertEqual(None, callbacks.exceptions["2"]) |
| 1353 | |
| 1354 | def test_execute_request_body(self): |
| 1355 | batch = BatchHttpRequest() |
nothing calls this directly
no test coverage detected