21 lines
443 B
Python
21 lines
443 B
Python
import pytest
|
|
import json
|
|
|
|
|
|
def test_auth(client, monkeypatch):
|
|
resp = client.get('/api/mail/')
|
|
assert resp.status_code == 302
|
|
|
|
|
|
def test_home_page(client, auth):
|
|
page = client.get('/')
|
|
assert page.status_code == 200
|
|
|
|
|
|
def test_entries_list(auth, client, journald_data):
|
|
page = client.get('/api/collection/')
|
|
assert page.status_code == 200
|
|
|
|
entries = json.loads(page.content.decode())
|
|
assert len(entries) == 10
|