diff options
author | 2018-05-31 11:03:12 +0200 | |
---|---|---|
committer | 2018-05-31 11:03:12 +0200 | |
commit | 15f73734f30d0c124e226d55b5e4a08683b6ea09 (patch) | |
tree | 19f4ea66d8c0c78ef601daa4199f08767e529ac2 /tests | |
parent | secure python execution (diff) |
adds nsjail compiled for ubuntu to see if unit testing can work with that
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_snekbox.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_snekbox.py b/tests/test_snekbox.py index 5c4d1c7..cc02ef8 100644 --- a/tests/test_snekbox.py +++ b/tests/test_snekbox.py @@ -1,7 +1,13 @@ import unittest import pytest +import os from snekbox import Snekbox -snek = Snekbox() -# Write some tests at some point +nsjail = os.sep.join([os.getcwd(), f'binaries{os.sep}nsjail2.6-ubuntu-x86_64']) +snek = Snekbox(nsjail_binary=nsjail, python_binary='/usr/bin/python3.6') + +class SnekTests(unittest.TestCase): + def test_nsjail(self): + result = snek.python3('print("test")') + self.assertEquals(result.strip(), 'test') |