

def _test_exception_handler_v20(self, expected_exception, status_code, expected_msg, error_type=None, error_msg=None, error_detail=None, error_content=None):
    if (error_content is None):
        error_content = {
            'NeutronError': {
                'type': error_type,
                'message': error_msg,
                'detail': error_detail,
            },
        }
    e = self.assertRaises(expected_exception, gbpclient.exception_handler_v20, status_code, error_content)
    expected_msg.assertEqual(status_code, e.status_code)
    if (expected_msg is None):
        if error_detail:
            expected_msg = '\n'.join([error_msg, error_detail])
        else:
            expected_msg = error_msg
    self.assertEqual(expected_msg, e.message)

dataset/ETHPy150Open openstack/python-group-based-policy-client/gbpclient/tests/unit/test_cli20.py CLITestV20ExceptionHandler._test_exception_handler_v20/VarMisuse@87/137 `self`->`expected_msg`