diff --git a/requirements-test.txt b/requirements-test.txt --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,4 @@ pytest pytest-postgresql hypothesis>=3.11.0 +swh.storage>= 0.0.178 diff --git a/swh/indexer/tests/test_origin_head.py b/swh/indexer/tests/test_origin_head.py --- a/swh/indexer/tests/test_origin_head.py +++ b/swh/indexer/tests/test_origin_head.py @@ -69,7 +69,7 @@ } }]) self.indexer.storage.origin_visit_update( - origin_url, visit['visit'], status='partial', snapshot=b'foo') + origin_url, visit.visit, status='partial', snapshot=b'foo') self.indexer.run([origin_url]) self.assertEqual(self.indexer.results, []) @@ -100,7 +100,7 @@ } }]) self.indexer.storage.origin_visit_update( - origin_url, visit['visit'], status='full', snapshot=b'foo') + origin_url, visit.visit, status='full', snapshot=b'foo') self.indexer.run(['https://pypi.org/project/abcdef/']) self.assertEqual(self.indexer.results, []) diff --git a/swh/indexer/tests/utils.py b/swh/indexer/tests/utils.py --- a/swh/indexer/tests/utils.py +++ b/swh/indexer/tests/utils.py @@ -554,7 +554,7 @@ for snap in SNAPSHOTS: origin_url = snap['origin'] visit = storage.origin_visit_add( - origin=origin_url, + origin_url, date=datetime.datetime.now(), type=visit_types[origin_url]) snap_id = snap.get('id') or \ @@ -564,7 +564,7 @@ 'branches': snap['branches'] }]) storage.origin_visit_update( - origin_url, visit['visit'], status='full', snapshot=snap_id) + origin_url, visit.visit, status='full', snapshot=snap_id) storage.revision_add(REVISIONS) contents = []