Add test of browsable endpoint to maintain coverage

This commit is contained in:
Bruno Michetti 2020-06-02 13:25:00 -03:00
parent 6cdcbfacd2
commit 9e8c98e892

View File

@ -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,