[test] init test

This commit is contained in:
SouthFox 2023-06-08 11:17:53 +08:00
parent 232ba85130
commit 3b31c7c4e5
3 changed files with 18 additions and 0 deletions

0
tests/__init__.py Normal file
View file

13
tests/conftest.py Normal file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import pytest
from app import app as flask_app
@pytest.fixture
def app():
yield flask_app
@pytest.fixture
def client(app):
return app.test_client()

5
tests/test_index.py Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env python3
def test_request_example(client):
response = client.get("/")
assert b"Hello Fediverse!" in response.data