diff options
author | 2019-06-02 23:28:09 +0200 | |
---|---|---|
committer | 2019-06-02 23:28:09 +0200 | |
commit | 77c7fc3e30069259bb5160048b152962da586350 (patch) | |
tree | 0585661f636f8c4f17e2fa763de93801208337b9 /tests/api/__init__.py | |
parent | Merge branch 'master' into revitalisation (diff) | |
parent | Revise docstrings for SnekAPI & EvalResource (diff) |
Merge pull request #23 from python-discord/falcon
Replace Flask with Falcon
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() |