Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_in_memory.TestInMemoryStorage::test_origin_visit_status_get_random
Failed

TEST RESULT

Run At
Jan 12 2021, 6:34 PM
Details
self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7f3be3418080> swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f3be34185f8> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f3be3418f60> def test_origin_visit_status_get_random(self, swh_storage, sample_data): origins = sample_data.origins[:2] swh_storage.origin_add(origins) # Add some random visits within the selection range visits = self._generate_random_visits() visit_type = "git" # Add visits to those origins for origin in origins: for date_visit in visits: visit = swh_storage.origin_visit_add( > [OriginVisit(origin=origin.url, date=date_visit, type=visit_type,)] )[0] .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:1576: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:892: in origin_visit_add snapshot=None, .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:902: in _origin_visit_status_add converters.visit_status_to_row(visit_status) .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/converters.py:113: in visit_status_to_row return OriginVisitStatusRow.from_dict({**d, "metadata": json.dumps(d["metadata"])}) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = <class 'swh.storage.cassandra.model.OriginVisitStatusRow'> d = {'date': datetime.datetime(2020, 11, 20, 1, 2, 23, 855423, tzinfo=datetime.timezone.utc), 'metadata': 'null', 'origin': 'https://github.com/user1/repo1', 'snapshot': None, ...} @classmethod def from_dict(cls: Type[T], d: Dict[str, Any]) -> T: > return cls(**d) # type: ignore E TypeError: __init__() missing 1 required positional argument: 'type' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/model.py:45: TypeError