aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nsjail.py
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-02-04 19:04:29 -0800
committerGravatar MarkKoz <[email protected]>2021-02-04 19:30:42 -0800
commita8b9c331fd7a69c9a89083886b7b47b3bba6f78a (patch)
tree85e80936f1dfcf3e927d15c8fd8eaf1244446ea5 /tests/test_nsjail.py
parentSuppress NsJail info logs during tests (diff)
Close file descriptors when subprocess ends
Diffstat (limited to 'tests/test_nsjail.py')
-rw-r--r--tests/test_nsjail.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py
index 7e7df9b..820f57e 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -192,7 +192,7 @@ class NsJailTests(unittest.TestCase):
chunk = "a" * READ_CHUNK_SIZE
expected_chunks = OUTPUT_MAX // sys.getsizeof(chunk) + 1
- nsjail_subprocess = unittest.mock.Mock()
+ nsjail_subprocess = unittest.mock.MagicMock()
# Go 10 chunks over to make sure we exceed the limit
nsjail_subprocess.stdout = io.StringIO((expected_chunks + 10) * chunk)