diff options
| author | 2018-07-22 19:43:27 +0200 | |
|---|---|---|
| committer | 2018-07-22 19:43:27 +0200 | |
| commit | 63d98bd2a052657773b3bf272b2249a45015a064 (patch) | |
| tree | d97cfafecb6f350cd826e7a352694ca3a905b778 /tests/test_clean_logs.py | |
| parent | Testing is hard and I hate it. (diff) | |
fixed tests that were breaking. hooo-ey.
Diffstat (limited to '')
| -rw-r--r-- | tests/test_clean_logs.py | 34 | 
1 files changed, 8 insertions, 26 deletions
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  |