aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_api_bot_snake.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-08-07 15:09:08 +0100
committerGravatar Gareth Coles <[email protected]>2018-08-07 15:09:16 +0100
commitaf54db6c136138c66cf5ca72419989525a0baa5c (patch)
tree8519aeab8d45277c51797c7dc23aacf3b56ed1bb /tests/test_api_bot_snake.py
parentA wizard is never late, nor is he early. (diff)
Initial project layout for django
Diffstat (limited to 'tests/test_api_bot_snake.py')
-rw-r--r--tests/test_api_bot_snake.py64
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/test_api_bot_snake.py b/tests/test_api_bot_snake.py
deleted file mode 100644
index fcc18409..00000000
--- a/tests/test_api_bot_snake.py
+++ /dev/null
@@ -1,64 +0,0 @@
-"""Tests the `/api/bot/snake_` endpoints."""
-
-from tests import SiteTest, app
-
-
-class TestSnakeFactsAPI(SiteTest):
- """GET method - get snake fact"""
-
- def test_snake_facts(self):
- response = self.client.get(
- '/bot/snake_facts',
- app.config['API_SUBDOMAIN'],
- headers=app.config['TEST_HEADER']
- )
- self.assertEqual(response.status_code, 200)
- self.assertEqual(type(response.json), str)
-
-
-class TestSnakeIdiomAPI(SiteTest):
- """GET method - get snake idiom"""
-
- def test_snake_idiom(self):
- response = self.client.get(
- '/bot/snake_idioms',
- app.config['API_SUBDOMAIN'],
- headers=app.config['TEST_HEADER']
- )
- self.assertEqual(response.status_code, 200)
- self.assertEqual(type(response.json), str)
-
-
-class TestSnakeQuizAPI(SiteTest):
- """GET method - get snake quiz"""
-
- def test_snake_quiz(self):
- response = self.client.get(
- '/bot/snake_quiz',
- app.config['API_SUBDOMAIN'],
- headers=app.config['TEST_HEADER']
- )
- self.assertEqual(response.status_code, 200)
- self.assertEqual(type(response.json), dict)
-
-
-class TestSnakeNameAPI(SiteTest):
- """GET method - get a single snake name, or all of them."""
-
- def test_snake_names(self):
- response = self.client.get(
- '/bot/snake_names',
- app.config['API_SUBDOMAIN'],
- headers=app.config['TEST_HEADER']
- )
- self.assertEqual(response.status_code, 200)
- self.assertEqual(type(response.json), dict)
-
- def test_snake_names_all(self):
- response = self.client.get(
- '/bot/snake_names?get_all=True',
- app.config['API_SUBDOMAIN'],
- headers=app.config['TEST_HEADER']
- )
- self.assertEqual(response.status_code, 200)
- self.assertEqual(type(response.json), list)