コード例 #1
0
ファイル: test_cf.py プロジェクト: cfstacks/stacks
    def test_gen_template_missing_properties(self):
        config = {'env': 'unittest'}
        tpl_file = open('tests/fixtures/valid_template.yaml')

        with self.assertRaises(SystemExit) as err:
            cf.gen_template(tpl_file, config)
        self.assertEqual(err.exception.code, 1)
コード例 #2
0
ファイル: test_cf.py プロジェクト: cfstacks/stacks
    def test_gen_invalid_template(self):
        config = {'env': 'dev', 'test_tag': 'testing'}
        tpl_file = open('tests/fixtures/invalid_template.yaml')

        with self.assertRaises(SystemExit) as err:
            cf.gen_template(tpl_file, config)
        self.assertEqual(err.exception.code, 1)
コード例 #3
0
    def test_gen_template_missing_properties(self):
        config = {'env': 'unittest'}
        tpl_file = open('tests/fixtures/valid_template.yaml')

        with self.assertRaises(SystemExit) as err:
            cf.gen_template(tpl_file, config)
        self.assertEqual(err.exception.code, 1)
コード例 #4
0
    def test_gen_invalid_template(self):
        config = {'env': 'dev', 'test_tag': 'testing'}
        tpl_file = open('tests/fixtures/invalid_template.yaml')

        with self.assertRaises(SystemExit) as err:
            cf.gen_template(tpl_file, config)
        self.assertEqual(err.exception.code, 1)
コード例 #5
0
ファイル: test_cf.py プロジェクト: cfstacks/stacks
 def test_gen_invalid_template_with_null_value(self):
     config = {'env': 'dev', 'test_tag': 'testing'}
     tpl_file = open('tests/fixtures/invalid_template_with_null_value.yaml')
     tpl, metadata, errors = cf.gen_template(tpl_file, config)
     self.assertIsInstance(tpl, str)
     self.assertIsInstance(metadata, dict)
     self.assertEqual(len(errors), 1)
コード例 #6
0
 def test_gen_valid_template(self):
     config = {'env': 'dev', 'test_tag': 'testing'}
     tpl_file = open('tests/fixtures/valid_template.yaml')
     tpl, metadata, errors = cf.gen_template(tpl_file, config)
     self.assertIsInstance(tpl, str)
     self.assertIsInstance(metadata, dict)
     self.assertEqual(len(errors), 0)
コード例 #7
0
ファイル: test_cf.py プロジェクト: thorstenhuhn/stacks
 def test_gen_valid_template(self):
     config = {'env': 'dev', 'test_tag': 'testing'}
     tpl_file = open('tests/fixtures/valid_template.yaml')
     tpl, options = cf.gen_template(tpl_file, config)
     self.assertIsInstance(tpl, str)
     self.assertIsInstance(options, dict)