Fix unit test?
This commit is contained in:
0
my_homepage/test/__init__.py
Normal file
0
my_homepage/test/__init__.py
Normal file
17
my_homepage/test/test_website.py
Normal file
17
my_homepage/test/test_website.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import pytest
|
||||
from .. import create_app
|
||||
|
||||
@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)
|
||||
Reference in New Issue
Block a user