diff options
-rw-r--r-- | tests/test_integration.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_integration.py b/tests/test_integration.py index ba0d9b5..5aa1b43 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -52,6 +52,19 @@ class IntegrationTests(unittest.TestCase): self.assertTrue(all(status == 200 for status in statuses)) self.assertTrue(all(json.loads(response)["returncode"] == 0 for response in responses)) + def test_eval(self): + """Test normal eval requests without files.""" + with run_gunicorn(): + cases = [ + ({"input": "print('Hello')"}, "Hello"), + ({"args": ["-c", "print('Hello')"]}, "Hello"), + ] + for body, expected in cases: + with self.subTest(body=body): + response, status = snekbox_request(body) + self.assertEqual(status, 200) + self.assertEqual(json.loads(response)["stdout"], expected) + def test_files_send_receive(self): """Test sending and receiving files to snekbox.""" with run_gunicorn(): |