diff --git a/tests/test_db.py b/tests/test_db.py index 13a7de4..ac8e64b 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -1,4 +1,5 @@ from datetime import datetime + import pytest from unwind import db, models, web_models @@ -7,7 +8,6 @@ from unwind import db, models, web_models @pytest.mark.asyncio async def test_add_and_get(shared_conn: db.Database): async with shared_conn.transaction(force_rollback=True): - m1 = models.Movie( title="test movie", release_year=2013, @@ -33,7 +33,6 @@ async def test_add_and_get(shared_conn: db.Database): @pytest.mark.asyncio async def test_find_ratings(shared_conn: db.Database): async with shared_conn.transaction(force_rollback=True): - m1 = models.Movie( title="test movie", release_year=2013, @@ -157,4 +156,3 @@ async def test_find_ratings(shared_conn: db.Database): rows = await db.find_ratings(title="test", include_unrated=True) ratings = tuple(web_models.Rating(**r) for r in rows) assert (web_models.Rating.from_movie(m1),) == ratings - diff --git a/tests/test_imdb.py b/tests/test_imdb.py index 48308a7..00467ce 100644 --- a/tests/test_imdb.py +++ b/tests/test_imdb.py @@ -1,4 +1,5 @@ import pytest + from unwind.imdb import imdb_rating_from_score, score_from_imdb_rating diff --git a/tests/test_web.py b/tests/test_web.py index 250447d..358c2a2 100644 --- a/tests/test_web.py +++ b/tests/test_web.py @@ -1,8 +1,7 @@ -from starlette.testclient import TestClient import pytest +from starlette.testclient import TestClient -from unwind import create_app -from unwind import db, models, imdb +from unwind import create_app, db, imdb, models app = create_app() @@ -10,7 +9,6 @@ app = create_app() @pytest.mark.asyncio async def test_app(shared_conn: db.Database): async with shared_conn.transaction(force_rollback=True): - # https://www.starlette.io/testclient/ client = TestClient(app) response = client.get("/api/v1/movies")