| Total Complexity | 8 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # -*- coding: utf-8 -*- |
||
| 6 | class DeployTest(unittest.TestCase): |
||
| 7 | |||
| 8 | def setUp(self): |
||
| 9 | pass |
||
| 10 | |||
| 11 | def tearDown(self): |
||
| 12 | pass |
||
| 13 | |||
| 14 | def test_get_yaml(self): |
||
| 15 | res = get_yaml('fixtures/wildcards.yaml') |
||
| 16 | self.assertEqual({'variables': {'variabele': {'correct': 'True'}}}, res) |
||
| 17 | |||
| 18 | def test_get_wildcards(self): |
||
| 19 | res = get_wildcards('fixtures/wildcards.yaml') |
||
| 20 | self.assertIn(('correct', 'True'), res) |
||
| 21 | |||
| 22 | def test_copy_and_replace(self): |
||
| 23 | mapping = get_wildcards('fixtures/wildcards.yaml') |
||
| 24 | copy_and_replace('fixtures/input.ini', 'fixtures/output.ini', mapping) |
||
| 25 | with open('fixtures/output.ini', "r") as in_file: |
||
| 26 | res = in_file.readlines() |
||
| 27 | self.assertIn('correct = True', res) |
||
| 28 | |||
| 29 | def test_append_extension(self): |
||
| 30 | append_extension('fixtures/output.ini','fixtures/outputext.ini', 'een test toevoeging') |
||
| 31 | with open('fixtures/outputext.ini', "r") as in_file: |
||
| 32 | res = in_file.readlines() |
||
| 33 | self.assertIn('een test toevoeging\n', res) |
||
| 34 |