Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/test_storage.py
Show First 20 Lines • Show All 2,836 Lines • ▼ Show 20 Lines | def test_content_find_ctime(self): | ||||
'blake2s256': cont['blake2s256'], | 'blake2s256': cont['blake2s256'], | ||||
'length': cont['length'], | 'length': cont['length'], | ||||
'status': 'visible' | 'status': 'visible' | ||||
}) | }) | ||||
def test_content_find_with_present_content(self): | def test_content_find_with_present_content(self): | ||||
# 1. with something to find | # 1. with something to find | ||||
cont = self.cont | cont = self.cont | ||||
self.storage.content_add([cont]) | self.storage.content_add([cont, self.cont2]) | ||||
actually_present = self.storage.content_find( | actually_present = self.storage.content_find( | ||||
{'sha1': cont['sha1']} | {'sha1': cont['sha1']} | ||||
) | ) | ||||
self.assertEqual(1, len(actually_present)) | self.assertEqual(1, len(actually_present)) | ||||
actually_present[0].pop('ctime') | actually_present[0].pop('ctime') | ||||
self.assertEqual(actually_present[0], { | self.assertEqual(actually_present[0], { | ||||
▲ Show 20 Lines • Show All 897 Lines • Show Last 20 Lines |