From a1b5e5bdc0652eda66bf550ab0423f000918645a Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Thu, 4 Feb 2021 19:08:58 -0800 Subject: Fix the memory limit test and the import error --- tests/test_nsjail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_nsjail.py') diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index 820f57e..06dc5b6 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 MEM_MAX, NsJail, OUTPUT_MAX, READ_CHUNK_SIZE +from snekbox.nsjail import NsJail, OUTPUT_MAX, READ_CHUNK_SIZE class NsJailTests(unittest.TestCase): @@ -40,7 +40,7 @@ class NsJailTests(unittest.TestCase): def test_memory_returns_137(self): # Add a kilobyte just to be safe. code = dedent(f""" - x = ' ' * {MEM_MAX + 1000} + x = ' ' * {self.nsjail.config.cgroup_mem_max + 1000} """).strip() result = self.nsjail.python3(code) -- cgit v1.2.3