diff options
| -rw-r--r-- | tests/__init__.py | 1 | ||||
| -rw-r--r-- | tests/test_clean_logs.py | 34 | ||||
| -rw-r--r-- | tests/test_staff.py | 3 | 
3 files changed, 9 insertions, 29 deletions
diff --git a/tests/__init__.py b/tests/__init__.py index 84e69105..1f3ca1a4 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,3 @@ -import json  import os  from flask import Blueprint diff --git a/tests/test_clean_logs.py b/tests/test_clean_logs.py index fe0c5ac7..210306c0 100644 --- a/tests/test_clean_logs.py +++ b/tests/test_clean_logs.py @@ -55,34 +55,16 @@ class TestCleanLogFrontEnd(SiteTest):      """      Tests the frontend for      viewing the clean logs. -    """ - -    def test_clean_log_frontend_returns_200(self): - -        # Get a log ID -        good_data = json.dumps({ -            "log_data": [ -                { -                    "author":    "something", -                    "content":   "testy", -                    "timestamp": "this way comes" -                } -            ] -        }) -        response = self.client.post( -            '/bot/clean', -            app.config['API_SUBDOMAIN'], -            headers=app.config['TEST_HEADER'], -            data=good_data -        ) - -        log_id = response.json.get("log_id") +    Best I can do with our current +    system is check if I'm redirected, +    since this is behind OAuth. +    """ -        # Now try to access it. +    def test_clean_log_frontend_returns_302(self):          response = self.client.get( -            f'/bot/clean_logs/{log_id}' +            f'/bot/clean_logs/1', +            'http://pytest.local'          ) -        self.assert200(response) -        self.assertIn("testy", response.text)
\ No newline at end of file +        self.assertEqual(response.status_code, 302)
\ No newline at end of file diff --git a/tests/test_staff.py b/tests/test_staff.py index 68c182b5..bc911b0c 100644 --- a/tests/test_staff.py +++ b/tests/test_staff.py @@ -1,7 +1,6 @@ -import os -import json  from tests import SiteTest, app +  class StaffEndpoints(SiteTest):      """ Test cases for staff subdomain """  |