Skip to content

Commit 4490140

Browse files
committed
Fixed unsecured tempfile.mktemp() command usage
1 parent 00f5be4 commit 4490140

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,8 +1521,8 @@ def test_set_path(client):
15211521

15221522
root = tempfile.mkdtemp()
15231523
sub = tempfile.mkdtemp(dir=root)
1524-
jsonfile = tempfile.mktemp(suffix=".json", dir=sub)
1525-
nojsonfile = tempfile.mktemp(dir=root)
1524+
jsonfile = tempfile.mkstemp(suffix=".json", dir=sub)
1525+
nojsonfile = tempfile.mkstemp(dir=root)
15261526

15271527
with open(jsonfile, "w+") as fp:
15281528
fp.write(json.dumps({"hello": "world"}))

0 commit comments

Comments
 (0)