'Assert that given response is an error due to third party session expiry'

def _assert_third_party_session_expired_error(self, response, expected_error_message):

    self.assertEqual(response.status_code, 400)
    response_json = json.loads(response.content)
    self.assertEqual(response_json, {'session_expired': [{'user_message': expected_error_message}]})
