Skip to content

Commit 31fd21f

Browse files
Replace hardcoded temp file with tempfile.NamedTemporaryFile
Co-authored-by: JacobCallahan <6618303+JacobCallahan@users.noreply.github.com>
1 parent 15c5626 commit 31fd21f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import builtins
44
import json
5+
import tempfile
56
from unittest import TestCase
67
from unittest.mock import call, mock_open, patch
78

@@ -14,7 +15,7 @@
1415
_get_config_file_path,
1516
)
1617

17-
FILE_PATH = '/tmp/bogus.json' # noqa: S108
18+
FILE_PATH = tempfile.NamedTemporaryFile(suffix='.json', delete=False).name
1819
CONFIGS = {
1920
'default': {'url': 'http://example.com'},
2021
'Ask Aak': {'url': 'bogus value', 'auth': ['username', 'password']},

0 commit comments

Comments
 (0)