Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123242
D3371.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D3371.diff
View Options
diff --git a/swh/web/tests/api/views/test_origin.py b/swh/web/tests/api/views/test_origin.py
--- a/swh/web/tests/api/views/test_origin.py
+++ b/swh/web/tests/api/views/test_origin.py
@@ -99,7 +99,7 @@
api_client, archive_data, new_origin, visit_dates, new_snapshots
):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
for i, visit_date in enumerate(visit_dates):
origin_visit = archive_data.origin_visit_add(
[OriginVisit(origin=new_origin.url, date=visit_date, type="git",)]
@@ -147,7 +147,7 @@
def test_api_lookup_origin_visits_by_id(
api_client, archive_data, new_origin, visit_dates, new_snapshots
):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
for i, visit_date in enumerate(visit_dates):
origin_visit = archive_data.origin_visit_add(
[OriginVisit(origin=new_origin.url, date=visit_date, type="git",)]
@@ -195,7 +195,7 @@
def test_api_lookup_origin_visit(
api_client, archive_data, new_origin, visit_dates, new_snapshots
):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
for i, visit_date in enumerate(visit_dates):
origin_visit = archive_data.origin_visit_add(
[OriginVisit(origin=new_origin.url, date=visit_date, type="git",)]
@@ -233,7 +233,7 @@
@given(new_origin())
def test_api_lookup_origin_visit_latest_no_visit(api_client, archive_data, new_origin):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
url = reverse("api-1-origin-visit-latest", url_args={"origin_url": new_origin.url})
@@ -249,7 +249,7 @@
def test_api_lookup_origin_visit_latest(
api_client, archive_data, new_origin, visit_dates, new_snapshots
):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
visit_dates.sort()
visit_ids = []
for i, visit_date in enumerate(visit_dates):
@@ -292,7 +292,7 @@
def test_api_lookup_origin_visit_latest_with_snapshot(
api_client, archive_data, new_origin, visit_dates, new_snapshots
):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
visit_dates.sort()
visit_ids = []
for i, visit_date in enumerate(visit_dates):
diff --git a/swh/web/tests/common/test_service.py b/swh/web/tests/common/test_service.py
--- a/swh/web/tests/common/test_service.py
+++ b/swh/web/tests/common/test_service.py
@@ -201,7 +201,7 @@
@given(new_origin(), visit_dates())
def test_lookup_origin_visits(archive_data, new_origin, visit_dates):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
archive_data.origin_visit_add(
[OriginVisit(origin=new_origin.url, date=ts, type="git",) for ts in visit_dates]
@@ -220,7 +220,7 @@
@given(new_origin(), visit_dates())
def test_lookup_origin_visit(archive_data, new_origin, visit_dates):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
visits = archive_data.origin_visit_add(
[OriginVisit(origin=new_origin.url, date=ts, type="git",) for ts in visit_dates]
)
@@ -235,7 +235,7 @@
@given(new_origin())
def test_lookup_origin(archive_data, new_origin):
- archive_data.origin_add_one(new_origin)
+ archive_data.origin_add([new_origin])
actual_origin = service.lookup_origin({"url": new_origin.url})
expected_origin = archive_data.origin_get({"url": new_origin.url})
@@ -947,7 +947,7 @@
def test_lookup_origin_missing_trailing_slash(archive_data):
deb_origin = Origin(url="http://snapshot.debian.org/package/r-base/")
- archive_data.origin_add_one(deb_origin)
+ archive_data.origin_add([deb_origin])
origin_info = service.lookup_origin({"url": deb_origin.url[:-1]})
assert origin_info["url"] == deb_origin.url
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 4:31 AM (1 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223952
Attached To
D3371: tests: Remove the use of deprecated origin_add_one storage method
Event Timeline
Log In to Comment