From 9e8c98e89271d90ca486aa450a4b11bfaf2ea3c5 Mon Sep 17 00:00:00 2001 From: Bruno Michetti Date: Tue, 2 Jun 2020 13:25:00 -0300 Subject: [PATCH] Add test of browsable endpoint to maintain coverage --- dj_rest_auth/tests/test_api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dj_rest_auth/tests/test_api.py b/dj_rest_auth/tests/test_api.py index c53be66..2115415 100644 --- a/dj_rest_auth/tests/test_api.py +++ b/dj_rest_auth/tests/test_api.py @@ -466,6 +466,13 @@ class APIBasicTests(TestsMixin, TestCase): new_user = get_user_model().objects.latest('id') self.assertEqual(new_user.username, self.REGISTRATION_DATA['username']) + # test browsable endpoint + result = self.get( + self.verify_email_url + ) + self.assertEqual(result.status_code, 405) + self.assertEqual(result.json['detail'], 'Method "GET" not allowed.') + # email is not verified yet payload = { "username": self.USERNAME,