aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_snekbox.py
blob: cc02ef816fb9ff169ef9d3ce5d2a5f351d60d144 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import unittest
import pytest
import os

from snekbox import Snekbox

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')