Ejemplo n.º 1
0
    def test_get_config_succeeds(self):
        cfg = PMCFConfig('tests/data/etc/pmcf.conf', 'default', {})

        opts = {
            'action': 'create',
            'debug': None,
            'instance_accesskey': None,
            'instance_secretkey': None,
            'output': 'AWSCFNOutput',
            'parser': 'AWSFWParser',
            'policy': 'JSONPolicy',
            'audit': 'NoopAudit',
            'audit_output': None,
            'policyfile': None,
            'poll': False,
            'provisioner': 'AWSFWProvisioner',
            'quiet': None,
            'region': None,
            'secretkey': None,
            'stackfile': None,
            'environment': None,
            'verbose': None,
            'use_iam_profile': False,
            'accesskey': None,
        }
        assert_equals(cfg.get_config(), opts)
Ejemplo n.º 2
0
 def test_get_missing_from_section_returns_none(self):
     cfg = PMCFConfig('tests/data/etc/pmcf.conf', 'default', {})
     cfg.get_config()
     item = cfg._get_from_section('default', 'wibble')
     assert_equals(item, None)
Ejemplo n.º 3
0
 def test_get_from_section_succeeds(self):
     cfg = PMCFConfig('tests/data/etc/pmcf.conf', 'default', {})
     cfg.get_config()
     item = cfg._get_from_section('default', 'output')
     assert_equals(item, 'AWSCFNOutput')