self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7efe30045390>
swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7efe1068bf28>
sample_data_model = {'authority': [MetadataAuthority(type=<MetadataAuthorityType.DEPOSIT_CLIENT: 'deposit_client'>, url='http://hal.inria....11', length=7, status='visible', data=b'424242\n', ctime=datetime.datetime(2019, 12, 1, 0, 0, tzinfo=tzlocal()))], ...}
def test_origin_add_from_generator(self, swh_storage, sample_data_model):
origin, origin2 = sample_data_model["origin"][:2]
origin_dict, origin2_dict = [o.to_dict() for o in [origin, origin2]]
def _ori_gen():
yield origin
yield origin2
stats = swh_storage.origin_add(_ori_gen())
> assert stats == {"origin:add": 2}
E AssertionError: assert {'origin:add': 0} == {'origin:add': 2}
E Differing items:
E {'origin:add': 0} != {'origin:add': 2}
E Full diff:
E - {'origin:add': 2}
E ? ^
E + {'origin:add': 0}
E ? ^
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:1217: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 21 2020, 10:58 AM