self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7f73d00bd828>
swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f73d02095c0>
def test_origin_add_from_generator(self, swh_storage):
def _ori_gen():
yield data.origin
yield data.origin2
origin1, origin2 = swh_storage.origin_add(_ori_gen())
actual_origin = swh_storage.origin_get([{"url": data.origin["url"],}])[0]
assert actual_origin["url"] == origin1["url"]
actual_origin2 = swh_storage.origin_get([{"url": data.origin2["url"],}])[0]
assert actual_origin2["url"] == origin2["url"]
if "id" in actual_origin:
del actual_origin["id"]
del actual_origin2["id"]
assert list(swh_storage.journal_writer.journal.objects) == [
("origin", actual_origin),
("origin", actual_origin2),
]
swh_storage.refresh_stat_counters()
> assert swh_storage.stat_counters()["origin"] == 2
E assert 5 == 2
E +5
E -2
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:1315: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Apr 9 2020, 12:48 PM