MCPcopy
hub / github.com/celery/celery / test_mget

Method test_mget

t/unit/backends/test_cosmosdbsql.py:120–131  ·  view source on GitHub ↗
(self, mock_client)

Source from the content-addressed store, hash-verified

118
119 @patch(MODULE_TO_MOCK + ".CosmosDBSQLBackend._client")
120 def test_mget(self, mock_client):
121 keys = [b"mykey1", b"mykey2"]
122
123 self.backend.mget(keys)
124
125 mock_client.ReadDocument.assert_has_calls(
126 [call("dbs/celerydb/colls/celerycol/docs/mykey1",
127 {"partitionKey": "mykey1"}),
128 call().get("value"),
129 call("dbs/celerydb/colls/celerycol/docs/mykey2",
130 {"partitionKey": "mykey2"}),
131 call().get("value")])
132
133 @patch(MODULE_TO_MOCK + ".CosmosDBSQLBackend._client")
134 def test_delete(self, mock_client):

Callers

nothing calls this directly

Calls 3

callFunction · 0.85
mgetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected