Removing obsolote code

This commit is contained in:
reverend 2020-09-12 11:02:01 +02:00
parent 87fd8fa96f
commit 9ae31c0146
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,6 @@ from django.contrib.auth.models import User
from lostplaces_app.models import PlaceImage, Place from lostplaces_app.models import PlaceImage, Place
from lostplaces_app.tests.models import SubmittableTestCase from lostplaces_app.tests.models import SubmittableTestCase
from lostplaces_app.tests.models.test_place_model import PlaceTestCase
from easy_thumbnails.fields import ThumbnailerImageField from easy_thumbnails.fields import ThumbnailerImageField
@ -37,6 +36,9 @@ class TestPlaceImage(SubmittableTestCase, TestCase):
place.tags.add('I a tag', 'testlocation') place.tags.add('I a tag', 'testlocation')
place.save() place.save()
if not os.path.isdir(settings.MEDIA_ROOT):
os.mkdir(settings.MEDIA_ROOT)
current_dir = os.path.dirname(os.path.abspath(__file__)) 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')): if not os.path.isfile(os.path.join(settings.MEDIA_ROOT, 'im_a_image_copy.jpeg')):
shutil.copyfile( shutil.copyfile(

View File

@ -6,7 +6,6 @@ from django.db import models
from django.contrib.auth.models import User from django.contrib.auth.models import User
from lostplaces_app.models import Place from lostplaces_app.models import Place
from lostplaces_app.tests import BaseData
from lostplaces_app.tests.models import SubmittableTestCase from lostplaces_app.tests.models import SubmittableTestCase