[test] init test
This commit is contained in:
parent
232ba85130
commit
3b31c7c4e5
3 changed files with 18 additions and 0 deletions
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
13
tests/conftest.py
Normal file
13
tests/conftest.py
Normal 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
5
tests/test_index.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
def test_request_example(client):
|
||||
response = client.get("/")
|
||||
assert b"Hello Fediverse!" in response.data
|
Loading…
Reference in a new issue