Archive alternatives must have a URL.

This commit is contained in:
Roland 2022-11-02 15:12:48 -06:00
parent c5538222ef
commit 7db4ea73f2
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
3 changed files with 31 additions and 5 deletions

View file

@ -106,9 +106,7 @@ def test_archives_search_no_query(test_session, archive_factory, test_client):
def test_archive_and_domain_crud(test_session, test_client, archive_factory):
"""
Getting an Archive returns it's File. Testing deleting Archives.
"""
"""Getting an Archive returns it's File. Testing deleting Archives."""
# Can get empty results.
request, response = test_client.get(f'/api/archive/1')
assert response.status_code == HTTPStatus.NOT_FOUND
@ -116,8 +114,8 @@ def test_archive_and_domain_crud(test_session, test_client, archive_factory):
assert response.status_code == HTTPStatus.OK
assert response.json['domains'] == []
archive1 = archive_factory(domain='example.com')
archive2 = archive_factory(domain='example.com')
archive1 = archive_factory(domain='example.com', url='https://example.com/1')
archive2 = archive_factory(domain='example.com', url='https://example.com/1')
test_session.commit()
# Archive1 has Archive2 as alternative.