diff options
Diffstat (limited to 'tests/api')
-rw-r--r-- | tests/api/__init__.py | 5 | ||||
-rw-r--r-- | tests/api/test_eval.py | 10 |
2 files changed, 5 insertions, 10 deletions
diff --git a/tests/api/__init__.py b/tests/api/__init__.py index a900316..3f7d250 100644 --- a/tests/api/__init__.py +++ b/tests/api/__init__.py @@ -14,10 +14,7 @@ class SnekAPITestCase(testing.TestCase): 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 = CompletedProcess( - args=[], - returncode=0, - stdout="output", - stderr="error" + args=[], returncode=0, stdout="output", stderr="error" ) self.addCleanup(self.patcher.stop) diff --git a/tests/api/test_eval.py b/tests/api/test_eval.py index 24e673a..976970e 100644 --- a/tests/api/test_eval.py +++ b/tests/api/test_eval.py @@ -20,15 +20,13 @@ class TestEvalResource(SnekAPITestCase): expected = { "title": "Request data failed validation", - "description": "'input' is a required property" + "description": "'input' is a required property", } self.assertEqual(expected, result.json) def test_post_invalid_data_400(self): - bodies = ( - {"input": 400}, {"input": "", "args": [400]} - ) + bodies = ({"input": 400}, {"input": "", "args": [400]}) for body in bodies: with self.subTest(): @@ -38,7 +36,7 @@ class TestEvalResource(SnekAPITestCase): expected = { "title": "Request data failed validation", - "description": "400 is not of type 'string'" + "description": "400 is not of type 'string'", } self.assertEqual(expected, result.json) @@ -52,7 +50,7 @@ class TestEvalResource(SnekAPITestCase): expected = { "title": "415 Unsupported Media Type", - "description": "application/xml is an unsupported media type." + "description": "application/xml is an unsupported media type.", } self.assertEqual(expected, result.json) |