diff options
author | 2019-06-05 09:11:26 -0700 | |
---|---|---|
committer | 2019-06-05 09:11:26 -0700 | |
commit | 26069d1412b94df1ec74194ee975d7f901f40489 (patch) | |
tree | 9baf1ebbdbb866a59dd0d58425ef6ccb4c03b66e /tests/api/__init__.py | |
parent | Configure gunicorn logging (diff) | |
parent | Merge pull request #23 from python-discord/falcon (diff) |
Merge remote-tracking branch 'origin/revitalisation' into refactor/nsjail
Diffstat (limited to 'tests/api/__init__.py')
-rw-r--r-- | tests/api/__init__.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/api/__init__.py b/tests/api/__init__.py new file mode 100644 index 0000000..fd4679a --- /dev/null +++ b/tests/api/__init__.py @@ -0,0 +1,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() |