diff --git a/tests.py b/tests.py index 1f0e1d9..844823e 100644 --- a/tests.py +++ b/tests.py @@ -180,11 +180,12 @@ async def test_data_provided_to_addtodatabase_ends_up_in_database(app_db: Engine async def test_created_database_contains_expected_tables(engine: Engine): + statement = text("SELECT name from sqlite_schema WHERE type = 'table'") with engine.connect() as connection: - statement = text("SELECT name from sqlite_schema WHERE type = 'table'") results = connection.execute(statement).all() assert len(results) == 0 create_db_and_tables(engine) + results = connection.execute(statement).all() assert len(results) == 1