Modify the api response

Update the api response so that it cannot contain the response
in the form of HTML which may prove vulnerable for MFE in future.

VAN-14
This commit is contained in:
uzairr
2020-09-01 14:17:21 +05:00
parent 2e491172b9
commit c68155f76f
5 changed files with 50 additions and 55 deletions

View File

@@ -126,7 +126,7 @@ class HelperMixin(object):
self.assertEqual(400, response.status_code)
payload = json.loads(response.content.decode('utf-8'))
self.assertFalse(payload.get('success'))
self.assertIn('In order to sign in, you need to activate your account.', payload.get('value'))
self.assertIn('inactive-user', payload.get('error_code'))
def assert_json_failure_response_is_missing_social_auth(self, response):
"""Asserts failure on /login for missing social auth looks right."""