blob: fd4679adb39b7b3619793720c7446b89cbd8b7d5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from unittest import mock
from falcon import testing
from snekbox.api import SnekAPI
class SnekAPITestCase(testing.TestCase):
def setUp(self):
super().setUp()
self.patcher = mock.patch("snekbox.api.resources.eval.NsJail", autospec=True)
self.mock_nsjail = self.patcher.start()
self.mock_nsjail.return_value.python3.return_value = "test output"
self.addCleanup(self.patcher.stop)
self.app = SnekAPI()
|