aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nsjail.py
diff options
context:
space:
mode:
authorGravatar Ionite <[email protected]>2023-03-02 16:56:23 -0500
committerGravatar Ionite <[email protected]>2023-03-02 16:56:23 -0500
commit9a2dc79a20feb3a0470a5096455fb826acb1f1b9 (patch)
tree5cec320f9a54447db497755c53c8989762812b53 /tests/test_nsjail.py
parentIgnore user uploads in output files, default output to `/home` (diff)
Update unit tests for home output directory
Diffstat (limited to 'tests/test_nsjail.py')
-rw-r--r--tests/test_nsjail.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py
index 71405c7..138c68a 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -191,12 +191,12 @@ class NsJailTests(unittest.TestCase):
data = "a" * 1024
size = 32 * 1024 * 1024
- with open("output/file", "w") as f:
+ with open("file", "w") as f:
for _ in range((size // 1024) - 5):
f.write(data)
for i in range(100):
- os.symlink("file", f"output/file{i}")
+ os.symlink("file", f"file{i}")
"""
).strip()
@@ -210,7 +210,7 @@ class NsJailTests(unittest.TestCase):
def test_file_write_error(self):
"""Test errors during file write."""
- result = self.nsjail.python3([""], [FileAttachment("output", "hello".encode())])
+ result = self.nsjail.python3([""], [FileAttachment("../dev", "hello".encode())])
self.assertEqual(result.returncode, None)
self.assertEqual(result.stdout, "IsADirectoryError: Failed to create file 'output'.")