Skip to content
Snippets Groups Projects
Commit d8f50410 authored by Lennard Strohmeyer's avatar Lennard Strohmeyer :penguin:
Browse files

pipeline fix

parent ca0c2635
No related branches found
No related tags found
1 merge request!1#155: fixed data disclosure tests for environments where no mongodb is...
Pipeline #1655961 failed
......@@ -190,9 +190,12 @@ class TestsDataDisclosure(BaseTestCase):
secret = data["secret"]
# create zip file to fulfil requirements
data_disclosure_location = settings.DATA_DISCLOSURE_LOCATION
if not data_disclosure_location or data_disclosure_location is None or data_disclosure_location == "":
data_disclosure_location = "./data_disclosure_zips"
empty_zip_data = ContentFile(b'PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
file_name = default_storage.save(
f"{settings.DATA_DISCLOSURE_LOCATION}/{file_id}.zip", empty_zip_data
f"{data_disclosure_location}/{file_id}.zip", empty_zip_data
)
disc = DataDisclosure.objects.get(id=file_id)
......@@ -238,9 +241,12 @@ class TestsDataDisclosure(BaseTestCase):
self.assertEqual(response.status_code, 403)
# create zip file to fulfil requirements
data_disclosure_location = settings.DATA_DISCLOSURE_LOCATION
if not data_disclosure_location or data_disclosure_location is None or data_disclosure_location == "":
data_disclosure_location = "./data_disclosure_zips"
empty_zip_data = ContentFile(b'PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
file_name = default_storage.save(
f"{settings.DATA_DISCLOSURE_LOCATION}/{file_id}.zip", empty_zip_data
f"{data_disclosure_location}/{file_id}.zip", empty_zip_data
)
disc = DataDisclosure.objects.get(id=file_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment