diff options
author | 2022-06-04 18:26:21 -0700 | |
---|---|---|
committer | 2022-06-04 23:22:25 -0700 | |
commit | e093f20bad446bb6023ef243fe867d5f2f7b4334 (patch) | |
tree | b7d80c68ce3931e8cd7464e0f3251bf64b242b5c /tests/test_nsjail.py | |
parent | Fix force-exclude option for black (diff) |
Add config path & output size args to NsJail class
Diffstat (limited to 'tests/test_nsjail.py')
-rw-r--r-- | tests/test_nsjail.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index a3632e6..dc30dfa 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -5,7 +5,7 @@ import unittest import unittest.mock from textwrap import dedent -from snekbox.nsjail import OUTPUT_MAX, READ_CHUNK_SIZE, NsJail +from snekbox.nsjail import NsJail class NsJailTests(unittest.TestCase): @@ -255,8 +255,8 @@ class NsJailTests(unittest.TestCase): self.assertEqual(result.returncode, 143) def test_large_output_is_truncated(self): - chunk = "a" * READ_CHUNK_SIZE - expected_chunks = OUTPUT_MAX // sys.getsizeof(chunk) + 1 + chunk = "a" * self.nsjail.read_chunk_size + expected_chunks = self.nsjail.max_output_size // sys.getsizeof(chunk) + 1 nsjail_subprocess = unittest.mock.MagicMock() |