my-homepage/my_homepage/test/test_website.py

18 lines
303 B
Python
Raw Normal View History

2021-02-28 01:28:04 +00:00
#!/usr/bin/env python3
import pytest
2021-12-23 04:20:09 +00:00
from .. import create_app
2021-02-28 01:28:04 +00:00
@pytest.fixture
def app():
app = create_app({"TESTING": True})
yield app
@pytest.fixture
def client(app):
return app.test_client()
def test_app(client):
response = client.get("/")
assert(response.status_code == 200)