From 9cd6522b26700db6eaf120c862cb7468c37136bc Mon Sep 17 00:00:00 2001 From: s3lph Date: Tue, 28 Aug 2018 21:45:11 +0200 Subject: [PATCH] Full coverage in config. --- matemat/webserver/test/test_config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/matemat/webserver/test/test_config.py b/matemat/webserver/test/test_config.py index 9e13374..e2ad985 100644 --- a/matemat/webserver/test/test_config.py +++ b/matemat/webserver/test/test_config.py @@ -241,3 +241,12 @@ class TestConfig(TestCase): with self.assertRaises(ValueError): # The filename is only a placeholder, file content is determined by mocking open parse_config_file('test') + + def test_parse_config_not_a_filename(self): + """ + Test type checking for the config filenames + """ + with self.assertRaises(TypeError): + parse_config_file(42) + with self.assertRaises(TypeError): + parse_config_file(['config', 42])