Esempio n. 1
0
    def test_cache(self):
        cache = ResolvedObjectCache().as_collection_cache()
        collection = TestCases.test_case_8()
        collection_json = collection.to_dict()
        cache.cache(collection_json, collection.get_self_href())

        self.assertEqual(cache.get_by_id(collection.id)['id'], collection.id)
Esempio n. 2
0
 def test_cache(self) -> None:
     cache = ResolvedObjectCache().as_collection_cache()
     collection = TestCases.test_case_8()
     collection_json = collection.to_dict()
     cache.cache(collection_json, collection.get_self_href())
     cached = cache.get_by_id(collection.id)
     assert isinstance(cached, dict)
     self.assertEqual(cached["id"], collection.id)