mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 03:46:29 -05:00
Archive alternatives must have a URL.
This commit is contained in:
parent
c5538222ef
commit
7db4ea73f2
3 changed files with 31 additions and 5 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue