| Conditions | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Tests what happens if the config file is invalid.""" |
||
| 26 | 1 | def testValidConfig(self): |
|
| 27 | 1 | config_file = tempfile.NamedTemporaryFile('w+') |
|
| 28 | 1 | try: |
|
| 29 | 1 | os.environ['PPP_LIBMODULE_TEST'] = config_file.name |
|
| 30 | 1 | config_file.write('{"foo": "bar"}') |
|
| 31 | 1 | config_file.seek(0) |
|
| 32 | 1 | self.assertEqual(Config().foo, 'bar') |
|
| 33 | finally: |
||
| 34 | 1 | config_file.close() |
|
| 35 | del os.environ['PPP_LIBMODULE_TEST'] |
||
| 36 |