Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
if not hasattr(self, 'assertRaisesRegex'):
self.assertRaisesRegex = self.assertRaisesRegexp
def __init__(self, *args):
unittest.TestCase.__init__(self, *args)
self._fail_pat = re.compile('FAIL ([0-9]+)')
self._warn_pat = re.compile('WARN ([0-9]+)')
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
if not hasattr(self, 'assertRaisesRegex'):
self.assertRaisesRegex = self.assertRaisesRegexp
def __init__(self, *args, **kwargs):
TestCase.__init__(self, *args, **kwargs)
if sys.version_info[0] == 2:
self.assertRegex = self.assertRegexpMatches
self._init_env()
def __init__(self, *args, **kwargs):
TestCase.__init__(self, *args, **kwargs)
# if sys.version_info[0] == 2:
# self.assertRegex = self.assertRegexpMatches
self._init_env()
def __init__(self, *args, **kwargs):
TestCase.__init__(self, *args, **kwargs)
alibabacloud.utils._test_flag = True
if sys.version_info[0] == 2:
self.assertRegex = self.assertRegexpMatches
self._sdk_config = self._init_sdk_config()
self.access_key_id = self._read_key_from_env_or_config("ACCESS_KEY_ID")
self.access_key_secret = self._read_key_from_env_or_config("ACCESS_KEY_SECRET")
self.region_id = self._read_key_from_env_or_config("REGION_ID")
self.ecs = self._get_ecs_resource()
def __init__(self, *args, **kw):
unittest.TestCase.__init__(self, *args, **kw)
self.reference = self._reference().copy()
# A (key, value) pair not in the mapping
key, value = self.reference.popitem()
self.other = {key:value}
# A (key, value) pair in the mapping
key, value = self.reference.popitem()
self.inmapping = {key:value}
self.reference[key] = value
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
if not hasattr(self, 'assertRaisesRegex'):
self.assertRaisesRegex = self.assertRaisesRegexp
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
if not hasattr(self, 'assertRaisesRegex'):
self.assertRaisesRegex = self.assertRaisesRegexp
def __init__(self, *args, **kwargs):
unittest.TestCase.__init__(self, *args, **kwargs)
self.currentResult = None # holds last result object passed to run method