From 9ae31c01468471f1c5a58f60ef556c8a87877234 Mon Sep 17 00:00:00 2001 From: reverend Date: Sat, 12 Sep 2020 11:02:01 +0200 Subject: [PATCH] Removing obsolote code --- .../lostplaces_app/tests/models/test_place_image_model.py | 4 +++- lostplaces/lostplaces_app/tests/models/test_place_model.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) 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