Page MenuHomeSoftware Heritage

D99.diff
No OneTemporary

D99.diff

diff --git a/swh/objstorage/tests/objstorage_testing.py b/swh/objstorage/tests/objstorage_testing.py
--- a/swh/objstorage/tests/objstorage_testing.py
+++ b/swh/objstorage/tests/objstorage_testing.py
@@ -23,6 +23,14 @@
self.assertEqual(content, expected_content)
@istest
+ def contains(self):
+ content_p, obj_id_p = self.hash_content(b'contains_present')
+ content_m, obj_id_m = self.hash_content(b'contains_missing')
+ self.storage.add(content_p, obj_id=obj_id_p)
+ self.assertIn(obj_id_p, self.storage)
+ self.assertNotIn(obj_id_m, self.storage)
+
+ @istest
def add_get_w_id(self):
content, obj_id = self.hash_content(b'add_get_w_id')
r = self.storage.add(content, obj_id=obj_id)
diff --git a/swh/objstorage/tests/test_objstorage_pathslicing.py b/swh/objstorage/tests/test_objstorage_pathslicing.py
--- a/swh/objstorage/tests/test_objstorage_pathslicing.py
+++ b/swh/objstorage/tests/test_objstorage_pathslicing.py
@@ -15,7 +15,7 @@
from objstorage_testing import ObjStorageTestFixture
-class TestpathSlicingObjStorage(ObjStorageTestFixture, unittest.TestCase):
+class TestPathSlicingObjStorage(ObjStorageTestFixture, unittest.TestCase):
def setUp(self):
super().setUp()
@@ -31,14 +31,6 @@
return self.storage._obj_path(hex_obj_id)
@istest
- def contains(self):
- content_p, obj_id_p = self.hash_content(b'contains_present')
- content_m, obj_id_m = self.hash_content(b'contains_missing')
- self.storage.add(content_p, obj_id=obj_id_p)
- self.assertIn(obj_id_p, self.storage)
- self.assertNotIn(obj_id_m, self.storage)
-
- @istest
def iter(self):
content, obj_id = self.hash_content(b'iter')
self.assertEqual(list(iter(self.storage)), [])
@@ -47,7 +39,7 @@
@istest
def len(self):
- content, obj_id = self.hash_content(b'check_not_gzip')
+ content, obj_id = self.hash_content(b'len')
self.assertEqual(len(self.storage), 0)
self.storage.add(content, obj_id=obj_id)
self.assertEqual(len(self.storage), 1)

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 4:58 PM (5 h, 31 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218218

Event Timeline