summaryrefslogtreecommitdiff
path: root/archaeological_finds/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-06-29 16:16:49 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:20 +0100
commita625511850a03a1948d1ede5b4a2b2b5f88a265f (patch)
tree87e9cc0cfa62a82510ee3f696729ebc15049f0a4 /archaeological_finds/tests.py
parenta8578dcee5b4cad64ec6e10b1dc5cbfad815b4c8 (diff)
downloadIshtar-a625511850a03a1948d1ede5b4a2b2b5f88a265f.tar.bz2
Ishtar-a625511850a03a1948d1ede5b4a2b2b5f88a265f.zip
Fix Ishtar bg deletion on test
Diffstat (limited to 'archaeological_finds/tests.py')
-rw-r--r--archaeological_finds/tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 9387840a0..2360d4ca6 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -22,6 +22,7 @@ import csv
import datetime
import json
import os
+import shutil
import tempfile
from rest_framework.test import APITestCase
@@ -1924,8 +1925,11 @@ class TreatmentTest(FindInit, TestCase):
model = models.Find
def setUp(self):
- img = settings.ROOT_PATH + \
+ base_img = settings.ROOT_PATH + \
'../ishtar_common/static/media/images/ishtar-bg.jpg'
+ temp_dir = tempfile.gettempdir()
+ img = os.path.join(temp_dir, 'ishtar-bg.jpg')
+ shutil.copy2(base_img, img)
self.create_finds(data_base={"label": u"Find 1"}, force=True)
self.create_finds(data_base={"label": u"Find 2"}, force=True)