MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / test_new_id

Method test_new_id

tests/test_http.py:1281–1293  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1279 self.assertEqual('{"answer": 42}', content)
1280
1281 def test_new_id(self):
1282 batch = BatchHttpRequest()
1283
1284 id_ = batch._new_id()
1285 self.assertEqual("1", id_)
1286
1287 id_ = batch._new_id()
1288 self.assertEqual("2", id_)
1289
1290 batch.add(self.request1, request_id="3")
1291
1292 id_ = batch._new_id()
1293 self.assertEqual("4", id_)
1294
1295 def test_add(self):
1296 batch = BatchHttpRequest()

Callers

nothing calls this directly

Calls 3

_new_idMethod · 0.95
addMethod · 0.95
BatchHttpRequestClass · 0.90

Tested by

no test coverage detected