Add 500 and 400, 403, 404 error redirects back to dashboard with basic message

This commit is contained in:
Aaron Kable
2020-04-17 06:45:01 +00:00
committed by Ariel Rin
parent 8addd483c2
commit d7dcacb899
4 changed files with 55 additions and 4 deletions

View File

@@ -27,7 +27,12 @@ class DiscordViewsTestCase(WebTest):
self.login()
manager.generate_oauth_redirect_url.return_value = '/example.com/oauth/'
response = self.app.get('/discord/activate/', auto_follow=False)
self.assertRedirects(response, expected_url='/example.com/oauth/', target_status_code=404)
self.assertRedirects(
response,
expected_url="/example.com/oauth/",
target_status_code=404,
fetch_redirect_response=False,
)
@mock.patch(MODULE_PATH + '.tasks.DiscordOAuthManager')
def test_callback(self, manager):