Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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)
Exemple #4
0
    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)
Exemple #5
0
    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)
Exemple #6
0
    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)
Exemple #7
0
 def test_cli_param_supplied(self):
     args = parse_args(['-u', '*****@*****.**'])
     config = resolve_config(args)
     self.assertEqual('*****@*****.**', config.username)
Exemple #8
0
 def test_cli_param_supplied(self):
     args = parse_args(['--account', "123456789012"])
     config = resolve_config(args)
     self.assertEqual("123456789012", config.account)
Exemple #9
0
 def test_with_environment(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertEqual(config.bg_response, 'foo')
Exemple #10
0
 def test_cli_param_supplied(self):
     args = parse_args(['--bg-response=foo'])
     config = resolve_config(args)
     self.assertEqual(config.bg_response, 'foo')
Exemple #11
0
 def test_cli_param_supplied(self):
     args = parse_args(['--region', "ap-southeast-4"])
     config = resolve_config(args)
     self.assertEqual("ap-southeast-4", config.region)
Exemple #12
0
 def test_cli_param_supplied(self):
     args = parse_args(['-r', "role1234"])
     config = resolve_config(args)
     self.assertEqual("role1234", config.role_arn)
Exemple #13
0
 def test_cli_param_supplied(self):
     args = parse_args(['-d', "500"])
     config = resolve_config(args)
     self.assertEqual(500, config.duration)
Exemple #14
0
 def test_with_environment(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertTrue(config.u2f_disabled)
Exemple #15
0
 def test_cli_param_supplied(self):
     args = parse_args(['-D'])
     config = resolve_config(args)
     self.assertTrue(config.u2f_disabled)
Exemple #16
0
 def test_default(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertFalse(config.u2f_disabled)
Exemple #17
0
 def test_cli_param_supplied(self):
     args = parse_args(['-a'])
     config = resolve_config(args)
     self.assertTrue(config.ask_role)
Exemple #18
0
 def test_with_environment(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertEqual("4567-role", config.role_arn)
Exemple #19
0
 def test_cli_param_supplied(self):
     args = parse_args(['-I', "kjl2342"])
     config = resolve_config(args)
     self.assertEqual("kjl2342", config.idp_id)
Exemple #20
0
 def test_default(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertEqual(43200, config.duration)
Exemple #21
0
 def test_cli_param_supplied(self):
     args = parse_args(['-p', 'profile'])
     config = resolve_config(args)
     self.assertEqual('profile', config.profile)
Exemple #22
0
    def test_invalid_cli_param_supplied(self):

        with self.assertRaises(SystemExit):
            args = parse_args(['-d', "blart"])
            resolve_config(args)
Exemple #23
0
 def test_cli_param_supplied(self):
     args = parse_args(['--resolve-aliases'])
     config = resolve_config(args)
     self.assertTrue(config.resolve_aliases)
Exemple #24
0
 def test_default(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertEqual(None, config.idp_id)
Exemple #25
0
 def test_with_environment(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertTrue(config.resolve_aliases)
Exemple #26
0
 def test_default(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertFalse(config.resolve_aliases)
Exemple #27
0
 def test_default(self):
     args = parse_args([])
     config = resolve_config(args)
     self.assertEqual("sts", config.profile)