diff options
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 |
commit | bf2ba1c61bbb51ffcea7035b4396846e9459206d (patch) | |
tree | 87e9cc0cfa62a82510ee3f696729ebc15049f0a4 /archaeological_finds | |
parent | a3af0d081a21713ff4c93c1d077477bc45c17527 (diff) | |
download | Ishtar-bf2ba1c61bbb51ffcea7035b4396846e9459206d.tar.bz2 Ishtar-bf2ba1c61bbb51ffcea7035b4396846e9459206d.zip |
Fix Ishtar bg deletion on test
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/tests.py | 6 |
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) |