diff --git a/plants/tests/test_models.py b/plants/tests/test_models.py index 60e262a..5c06163 100644 --- a/plants/tests/test_models.py +++ b/plants/tests/test_models.py @@ -1,5 +1,5 @@ import pytest -from plants.models import Species, Plant, PruningLog, Location +from plants.models import Species, Plant, PruningLog, Location, PlantCardPhoto from datetime import date @@ -57,7 +57,6 @@ def test_delete_species_nulls_plant_species(): @pytest.mark.django_db def test_card_photo_belongs_to_plant(): - from plants.models import PlantCardPhoto plant = Plant.objects.create(name='Test') photo = PlantCardPhoto.objects.create(plant=plant, image='plants/cards/test.jpg') assert photo.plant == plant @@ -65,7 +64,6 @@ def test_card_photo_belongs_to_plant(): @pytest.mark.django_db def test_card_photos_ordered_by_uploaded_at(): - from plants.models import PlantCardPhoto plant = Plant.objects.create(name='Test') p1 = PlantCardPhoto.objects.create(plant=plant, image='plants/cards/a.jpg') p2 = PlantCardPhoto.objects.create(plant=plant, image='plants/cards/b.jpg') @@ -76,7 +74,6 @@ def test_card_photos_ordered_by_uploaded_at(): @pytest.mark.django_db def test_card_photos_deleted_with_plant(): - from plants.models import PlantCardPhoto plant = Plant.objects.create(name='Test') PlantCardPhoto.objects.create(plant=plant, image='plants/cards/test.jpg') plant.delete()