From 15f73734f30d0c124e226d55b5e4a08683b6ea09 Mon Sep 17 00:00:00 2001 From: Christopher Baklid Date: Thu, 31 May 2018 11:03:12 +0200 Subject: adds nsjail compiled for ubuntu to see if unit testing can work with that --- tests/test_snekbox.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/test_snekbox.py') 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') -- cgit v1.2.3