#11 Fixed pep8 test failures

This commit is contained in:
Luke Else 2024-02-23 18:33:19 +00:00
parent bcde471f33
commit 68f738a241
4 changed files with 6 additions and 5 deletions

View File

@ -41,6 +41,7 @@ def create_connection(path: str, filename: str):
if __name__ == "__main__":
run()
def run():
""" Create the database for the application"""
dir = r"./data/"

View File

@ -16,6 +16,7 @@ os.environ["ENVIRON"] = "test"
run()
@pytest.fixture(scope="module")
def test_client() -> FlaskClient:
""" Enables tests to create requests to the web app

View File

@ -3,6 +3,7 @@ from bs4 import BeautifulSoup
from tests import test_client
from flask.testing import FlaskClient
# def test_use_case(test_client: FlaskClient):
# response = test_client.get('/products/Car Parts')
# assert response.status_code == 200
def test_use_case(test_client: FlaskClient):
response = test_client.get('/products/Car Parts')
assert response.status_code == 200

View File

@ -1,2 +0,0 @@
# Ensure test environment is set before using
# Runs the database creation scripts