mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-12 13:38:33 +03:00
closes TODOs, renames task to archive, fixes read permissions and fixes tests
This commit is contained in:
@@ -88,7 +88,7 @@ def test_create_task(db_session):
|
||||
)
|
||||
|
||||
# with tags and urls
|
||||
nt = worker_crud.create_task(db_session, task, [models.Tag(id="tag-101")], [models.ArchiveUrl(url="https://example-0.com/0", key="media_0")])
|
||||
nt = worker_crud.create_archive(db_session, task, [models.Tag(id="tag-101")], [models.ArchiveUrl(url="https://example-0.com/0", key="media_0")])
|
||||
|
||||
assert nt is not None
|
||||
assert nt.id == "archive-id-456-101"
|
||||
@@ -105,7 +105,7 @@ def test_create_task(db_session):
|
||||
|
||||
# without tags and urls
|
||||
task.id = "archive-id-456-102"
|
||||
nt = worker_crud.create_task(db_session, task, [], [])
|
||||
nt = worker_crud.create_archive(db_session, task, [], [])
|
||||
assert nt is not None
|
||||
assert nt.id == "archive-id-456-102"
|
||||
assert nt.url == "https://example-0.com"
|
||||
|
||||
Reference in New Issue
Block a user