def testErrorFormat(self):
    ident_dict = {'key': 'Email:andy@emailscrubbed.com', 'authority': 'FakeViewfinder'}
    auth_info_dict = {'identity': ident_dict['key']}
    url = self._tester.GetUrl('/login/viewfinder')
    request_dict = _CreateRegisterRequest(self._mobile_device_dict, auth_info_dict, synchronous=False)
    response = _SendAuthRequest(self._tester, url, 'POST', request_dict=request_dict, allow_errors=[403])

    self.assertEqual(json.loads(response.body),
                     {'error': {'id': 'NO_USER_ACCOUNT',
                                'method': 'login',
                                'message': 'We can\'t find your Viewfinder account. Are you sure you used ' +
                                           'andy@emailscrubbed.com to sign up?'}})
Test that error returned by the service handler is properly formed.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/auth_test.py/AuthTestCase.testErrorFormat