self = <swh.storage.tests.test_tenacious.TestTenaciousStorage object at 0x7fd9db976ba8>
swh_storage = <swh.storage.proxies.tenacious.TenaciousProxyStorage object at 0x7fd9da04b0f0>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fdc04e60748>
def test_revision_add(self, swh_storage, sample_data):
revision = sample_data.revision
init_missing = swh_storage.revision_missing([revision.id])
assert list(init_missing) == [revision.id]
actual_result = swh_storage.revision_add([revision])
assert actual_result == {"revision:add": 1}
end_missing = swh_storage.revision_missing([revision.id])
assert list(end_missing) == []
assert list(swh_storage.journal_writer.journal.objects) == [
("revision", revision)
]
# already there so nothing added
actual_result = swh_storage.revision_add([revision])
assert actual_result == {"revision:add": 0}
if not isinstance(swh_storage, (CassandraStorage, RemoteStorage)):
swh_storage.refresh_stat_counters()
> assert swh_storage.stat_counters()["revision"] == 1
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:985:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7fd9db9e8cc0>
def stat_counters(self):
> raise NotImplementedError()
E NotImplementedError
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:1293: NotImplementedError
TEST RESULT
TEST RESULT
- Run At
- Aug 27 2021, 12:11 PM