'Ensure that the response has the appropriate HTTP status, and provides
the expected error_code in the JSON response body.'

def check_error_codes(self, response, status_code, error_code):

    response_dict = json.loads(response.content)
    self.assertEqual(response.status_code, status_code)
    self.assertEqual(response_dict[u'error_code'], error_code)
