Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_origin_visit_add
Failed

TEST RESULT

Run At
Jun 17 2020, 10:13 AM
Details
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7f36bc3a7a90> swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f369c22e320> def test_origin_visit_add(self, swh_storage): origin1 = Origin.from_dict(data.origin2) swh_storage.origin_add_one(origin1) date_visit = now() date_visit2 = date_visit + datetime.timedelta(minutes=1) date_visit = round_to_milliseconds(date_visit) date_visit2 = round_to_milliseconds(date_visit2) visit1 = OriginVisit( origin=origin1.url, date=date_visit, type=data.type_visit1, status="ongoing", snapshot=None, ) visit2 = OriginVisit( origin=origin1.url, date=date_visit2, type=data.type_visit2, status="partial", snapshot=None, ) # add once ov1, ov2 = swh_storage.origin_visit_add([visit1, visit2]) # then again (will be ignored as they already exist) origin_visit1, origin_visit2 = swh_storage.origin_visit_add([ov1, ov2]) assert ov1 == origin_visit1 assert ov2 == origin_visit2 > actual_origin_visits = list(swh_storage.origin_visit_get(origin1.url)) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:1663: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:897: in origin_visit_get yield self._origin_visit_apply_last_status(visit) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.cassandra.storage.CassandraStorage object at 0x7f369c22eac8> visit = {'date': datetime.datetime(2020, 6, 17, 8, 9, 49, 937000, tzinfo=datetime.timezone.utc), 'metadata': None, 'origin': 'file:///dev/zero', 'snapshot': None, ...} def _origin_visit_apply_last_status(self, visit: Dict[str, Any]) -> Dict[str, Any]: """Retrieve the latest visit status information for the origin visit. Then merge it with the visit and return it. """ > visit_status = self._cql_runner.origin_visit_status_get_latest( visit["origin"], visit["visit"] ) E AttributeError: 'CqlRunner' object has no attribute 'origin_visit_status_get_latest' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:866: AttributeError