mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 21:59:58 -05:00
Creating a new Collection model for use in organizing FileGroups.
Replacing Channels and Domains with Collection. Moving downloading relationships from Channel to Collection. Created domains.yaml config to manage tagged domain collections. Adding turn-key upgrade solution in the UI.
This commit is contained in:
parent
1ed0d63bac
commit
a1e0fb4e92
115 changed files with 13309 additions and 986 deletions
|
|
@ -1,10 +1,13 @@
|
|||
import json
|
||||
from http import HTTPStatus
|
||||
|
||||
import pytest
|
||||
|
||||
def test_encrypt(test_client):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_encrypt(async_client):
|
||||
body = dict(otp='asdf', plaintext='asdf')
|
||||
request, response = test_client.post('/api/otp/encrypt_otp', content=json.dumps(body))
|
||||
request, response = await async_client.post('/api/otp/encrypt_otp', content=json.dumps(body))
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
assert response.json == dict(
|
||||
ciphertext='AAGK',
|
||||
|
|
@ -13,9 +16,10 @@ def test_encrypt(test_client):
|
|||
)
|
||||
|
||||
|
||||
def test_decrypt(test_client):
|
||||
@pytest.mark.asyncio
|
||||
async def test_decrypt(async_client):
|
||||
body = dict(otp='asdf', ciphertext='aagk')
|
||||
request, response = test_client.post('/api/otp/decrypt_otp', content=json.dumps(body))
|
||||
request, response = await async_client.post('/api/otp/decrypt_otp', content=json.dumps(body))
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
assert response.json == dict(
|
||||
ciphertext='AAGK',
|
||||
|
|
@ -24,6 +28,7 @@ def test_decrypt(test_client):
|
|||
)
|
||||
|
||||
|
||||
def test_get_html(test_client):
|
||||
request, response = test_client.get('/api/otp/html')
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_html(async_client):
|
||||
request, response = await async_client.get('/api/otp/html')
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue