mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
Configs can be saved in background using switches.
This commit is contained in:
parent
44d4921c84
commit
d54735c4bb
53 changed files with 967 additions and 574 deletions
|
|
@ -82,20 +82,20 @@ def test_archives_search(test_session, archive_directory, archive_factory, test_
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_archive_tags(test_session, test_async_client, archive_factory, tag_factory):
|
||||
async def test_search_archive_tags(test_session, async_client, archive_factory, tag_factory):
|
||||
"""Tagged Archives can be searched."""
|
||||
tag = await tag_factory()
|
||||
archive_factory(domain='example.com', tag_names=[tag.name, ])
|
||||
test_session.commit()
|
||||
|
||||
content = {'search_str': '', 'domain': 'example.com', 'tag_names': [tag.name, ]}
|
||||
request, response = await test_async_client.post('/api/archive/search', content=json.dumps(content))
|
||||
request, response = await async_client.post('/api/archive/search', content=json.dumps(content))
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
assert response.json['file_groups']
|
||||
assert response.json['totals']['file_groups'] == 1
|
||||
|
||||
content = {'search_str': '', 'domain': 'example.com', 'tag_names': ['does not exist', ]}
|
||||
request, response = await test_async_client.post('/api/archive/search', content=json.dumps(content))
|
||||
request, response = await async_client.post('/api/archive/search', content=json.dumps(content))
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
assert response.json['file_groups'] == []
|
||||
assert response.json['totals']['file_groups'] == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue