def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual("ap-southeast-9", config.region) args = parse_args(['--region', "ap-southeast-4"]) config = resolve_config(args) self.assertEqual("ap-southeast-4", config.region)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual('mytemp', config.profile) args = parse_args(['-p', 'profile']) config = resolve_config(args) self.assertEqual('profile', config.profile)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual("adsfasf233423", config.idp_id) args = parse_args(['-I', "kjl2342"]) config = resolve_config(args) self.assertEqual("kjl2342", config.idp_id)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual('*****@*****.**', config.username) args = parse_args(['-u', '*****@*****.**']) config = resolve_config(args) self.assertEqual('*****@*****.**', config.username)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual("123456789012", config.account) args = parse_args(['--region', "123456789012"]) config = resolve_config(args) self.assertEqual("123456789012", config.account)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual(3000, config.duration) args = parse_args(['-d', "500"]) config = resolve_config(args) self.assertEqual(500, config.duration)
def test_cli_param_supplied(self): args = parse_args(['-u', '*****@*****.**']) config = resolve_config(args) self.assertEqual('*****@*****.**', config.username)
def test_cli_param_supplied(self): args = parse_args(['--account', "123456789012"]) config = resolve_config(args) self.assertEqual("123456789012", config.account)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual(config.bg_response, 'foo')
def test_cli_param_supplied(self): args = parse_args(['--bg-response=foo']) config = resolve_config(args) self.assertEqual(config.bg_response, 'foo')
def test_cli_param_supplied(self): args = parse_args(['--region', "ap-southeast-4"]) config = resolve_config(args) self.assertEqual("ap-southeast-4", config.region)
def test_cli_param_supplied(self): args = parse_args(['-r', "role1234"]) config = resolve_config(args) self.assertEqual("role1234", config.role_arn)
def test_cli_param_supplied(self): args = parse_args(['-d', "500"]) config = resolve_config(args) self.assertEqual(500, config.duration)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertTrue(config.u2f_disabled)
def test_cli_param_supplied(self): args = parse_args(['-D']) config = resolve_config(args) self.assertTrue(config.u2f_disabled)
def test_default(self): args = parse_args([]) config = resolve_config(args) self.assertFalse(config.u2f_disabled)
def test_cli_param_supplied(self): args = parse_args(['-a']) config = resolve_config(args) self.assertTrue(config.ask_role)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertEqual("4567-role", config.role_arn)
def test_cli_param_supplied(self): args = parse_args(['-I', "kjl2342"]) config = resolve_config(args) self.assertEqual("kjl2342", config.idp_id)
def test_default(self): args = parse_args([]) config = resolve_config(args) self.assertEqual(43200, config.duration)
def test_cli_param_supplied(self): args = parse_args(['-p', 'profile']) config = resolve_config(args) self.assertEqual('profile', config.profile)
def test_invalid_cli_param_supplied(self): with self.assertRaises(SystemExit): args = parse_args(['-d', "blart"]) resolve_config(args)
def test_cli_param_supplied(self): args = parse_args(['--resolve-aliases']) config = resolve_config(args) self.assertTrue(config.resolve_aliases)
def test_default(self): args = parse_args([]) config = resolve_config(args) self.assertEqual(None, config.idp_id)
def test_with_environment(self): args = parse_args([]) config = resolve_config(args) self.assertTrue(config.resolve_aliases)
def test_default(self): args = parse_args([]) config = resolve_config(args) self.assertFalse(config.resolve_aliases)
def test_default(self): args = parse_args([]) config = resolve_config(args) self.assertEqual("sts", config.profile)