self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7f6247d38e80>
swh_storage = <RemoteStorage url=mock://example.com/>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f6247c59898>
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}
E AssertionError: assert {'revision:add': 1} == {'revision:add': 0}
E Differing items:
E {'revision:add': 1} != {'revision:add': 0}
E Full diff:
E - {'revision:add': 0}
E ? ^
E + {'revision:add': 1}
E ? ^
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:939: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Apr 29 2021, 11:06 AM