From 5901528848acbc82ad57bdb6f4c25c51a52ead5c Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 16 Feb 2021 19:15:35 +0300 Subject: Add basic integration tests to test out the API --- tests/integration/__init__.py | 0 tests/integration/test_gemma.py | 15 +++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/integration/__init__.py create mode 100644 tests/integration/test_gemma.py (limited to 'tests') diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/integration/test_gemma.py b/tests/integration/test_gemma.py new file mode 100644 index 0000000..3afbc0c --- /dev/null +++ b/tests/integration/test_gemma.py @@ -0,0 +1,15 @@ +"""Integration tests for gemma API endpoints""" +import unittest + +from gn3.app import create_app + + +class GemmaAPITest(unittest.TestCase): + """Test cases for the Gemma API""" + def setUp(self): + self.app = create_app().test_client() + + def test_gemma_index(self): + """Test that the correct response is returned""" + response = self.app.get("/gemma", follow_redirects=True) + self.assertEqual(response.get_json().get("result"), "hello world") -- cgit v1.2.3