diff --git a/plants/tests/test_views.py b/plants/tests/test_views.py index a92cfa2..d2c387a 100644 --- a/plants/tests/test_views.py +++ b/plants/tests/test_views.py @@ -1,7 +1,7 @@ import pytest from django.urls import reverse from datetime import date -from plants.models import Plant, PruningLog, Location +from plants.models import Plant, PruningLog, Location, PlantCardPhoto def make_location(name): @@ -245,7 +245,6 @@ class TestPlantCard: class TestUploadCardPhoto: def test_upload_creates_card_photo(self, client): from django.core.files.uploadedfile import SimpleUploadedFile - from plants.models import PlantCardPhoto plant = Plant.objects.create(name='Fern') image = SimpleUploadedFile('card.jpg', b'\xff\xd8\xff\xe0' + b'\x00' * 100, content_type='image/jpeg') resp = client.post(reverse('upload_card_photo', args=[plant.pk]), {'image': image}) @@ -254,7 +253,6 @@ class TestUploadCardPhoto: def test_upload_blocked_at_max_3(self, client): from django.core.files.uploadedfile import SimpleUploadedFile - from plants.models import PlantCardPhoto plant = Plant.objects.create(name='Fern') for i in range(3): PlantCardPhoto.objects.create(plant=plant, image=f'plants/cards/card{i}.jpg')