Skip to content

Commit d65ab03

Browse files
authored
Fix tempfile failure in CI (#1195)
* Use tempfile inside test class not via override_settings No-Issue
1 parent 1298413 commit d65ab03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

galaxy_ng/tests/unit/app/test_tasks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from unittest import mock
55

66
from django.conf import settings
7-
from django.test import TestCase, override_settings
7+
from django.test import TestCase
88

99
from pulpcore.plugin.models import Artifact, PulpTemporaryFile, ContentArtifact
1010
from pulp_ansible.app.models import (
@@ -23,10 +23,10 @@
2323
staging_name = settings.GALAXY_API_STAGING_DISTRIBUTION_BASE_PATH
2424

2525

26-
@override_settings(WORKING_DIRECTORY=tempfile.mkdtemp(suffix='galaxy_ng_unittest'))
26+
# @override_settings(WORKING_DIRECTORY=tempfile.mkdtemp(suffix='galaxy_ng_unittest'))
2727
class TestTaskPublish(TestCase):
28-
# artifact_path = os.path.join(tempfile.gettempdir(), 'artifact-tmp')
29-
artifact_path = os.path.join(settings.WORKING_DIRECTORY, 'artifact-tmp')
28+
artifact_path = os.path.join(tempfile.gettempdir(), 'artifact-tmp')
29+
# artifact_path = os.path.join(settings.WORKING_DIRECTORY, 'artifact-tmp')
3030

3131
def setUp(self):
3232
with open(self.artifact_path, 'w') as f:

0 commit comments

Comments
 (0)