From 1f8dbf310df9ae82182e4ef51c8dd37402e917c9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 30 Aug 2019 21:45:28 +0100 Subject: [PATCH] Remove web tests, for now --- tests/test_web/__init__.py | 8 -------- tests/test_web/test_healthcheck.py | 26 -------------------------- 2 files changed, 34 deletions(-) delete mode 100644 tests/test_web/__init__.py delete mode 100644 tests/test_web/test_healthcheck.py diff --git a/tests/test_web/__init__.py b/tests/test_web/__init__.py deleted file mode 100644 index 101f481..0000000 --- a/tests/test_web/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -from aiohttp.test_utils import AioHTTPTestCase - -from actioner.web import get_server - - -class BaseWebTestCase(AioHTTPTestCase): - async def get_application(self): - return get_server() diff --git a/tests/test_web/test_healthcheck.py b/tests/test_web/test_healthcheck.py deleted file mode 100644 index f3f4563..0000000 --- a/tests/test_web/test_healthcheck.py +++ /dev/null @@ -1,26 +0,0 @@ -from aiohttp import BasicAuth -from aiohttp.test_utils import unittest_run_loop - -from actioner.settings import BASIC_AUTH -from tests.test_web import BaseWebTestCase - - -class HealthcheckTestCase(BaseWebTestCase): - @unittest_run_loop - async def test_heartbeat_requires_auth(self): - response = await self.client.get("/healthcheck") - self.assertEqual(response.status, 401) - response = await self.client.get( - "/healthcheck", headers={"Authorization": BasicAuth(*BASIC_AUTH).encode()} - ) - self.assertEqual(response.status, 200) - - @unittest_run_loop - async def test_heartbeat_response(self): - response = await self.client.get( - "/healthcheck", headers={"Authorization": BasicAuth(*BASIC_AUTH).encode()} - ) - self.assertEqual(response.status, 200) - self.assertEqual( - await response.json(), {"github": "RealOrangeOne", "todoist": 7471233} - )