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

Method test_mget

t/unit/backends/test_gcs.py:200–209  ·  view source on GitHub ↗
(self, mock_firestore_ttl, mock_get, base_path)

Source from the content-addressed store, hash-verified

198 @patch.object(GCSBackend, 'get')
199 @patch.object(GCSBackend, '_is_firestore_ttl_policy_enabled')
200 def test_mget(self, mock_firestore_ttl, mock_get, base_path):
201 self.app.conf.gcs_base_path = base_path
202 mock_firestore_ttl.return_value = True
203 backend = GCSBackend(app=self.app)
204 mock_get.side_effect = ['value1', 'value2']
205 result = backend.mget([b'key1', b'key2'])
206 mock_get.assert_has_calls(
207 [call(b'key1'), call(b'key2')], any_order=True
208 )
209 assert sorted(result) == sorted(['value1', 'value2'])
210
211 @patch.object(GCSBackend, 'client')
212 @patch.object(GCSBackend, '_is_firestore_ttl_policy_enabled')

Callers

nothing calls this directly

Calls 3

GCSBackendClass · 0.90
callFunction · 0.85
mgetMethod · 0.45

Tested by

no test coverage detected