diff --git a/lostplaces/lostplaces_app/tests/models/test_place_image_model.py b/lostplaces/lostplaces_app/tests/models/test_place_image_model.py index 8a1d137..bd3f4b2 100644 --- a/lostplaces/lostplaces_app/tests/models/test_place_image_model.py +++ b/lostplaces/lostplaces_app/tests/models/test_place_image_model.py @@ -11,7 +11,6 @@ from django.contrib.auth.models import User from lostplaces_app.models import PlaceImage, Place from lostplaces_app.tests.models import SubmittableTestCase -from lostplaces_app.tests.models.test_place_model import PlaceTestCase from easy_thumbnails.fields import ThumbnailerImageField @@ -37,6 +36,9 @@ class TestPlaceImage(SubmittableTestCase, TestCase): place.tags.add('I a tag', 'testlocation') place.save() + if not os.path.isdir(settings.MEDIA_ROOT): + os.mkdir(settings.MEDIA_ROOT) + current_dir = os.path.dirname(os.path.abspath(__file__)) if not os.path.isfile(os.path.join(settings.MEDIA_ROOT, 'im_a_image_copy.jpeg')): shutil.copyfile( diff --git a/lostplaces/lostplaces_app/tests/models/test_place_model.py b/lostplaces/lostplaces_app/tests/models/test_place_model.py index 6a1b53f..fb92863 100644 --- a/lostplaces/lostplaces_app/tests/models/test_place_model.py +++ b/lostplaces/lostplaces_app/tests/models/test_place_model.py @@ -6,7 +6,6 @@ from django.db import models from django.contrib.auth.models import User from lostplaces_app.models import Place -from lostplaces_app.tests import BaseData from lostplaces_app.tests.models import SubmittableTestCase