Commit 078f21cab98c5505fccad5de40ffa0f561020bc7
1 parent
ec901aba
Exists in
master
and in
2 other branches
Write settings with syntax error on /tmp
The .py file into the repo was preventing us to generate RPM packages
Showing
2 changed files
with
4 additions
and
3 deletions
Show diff stats
colab/utils/tests/settings_with_syntax_error.py
... | ... | @@ -1 +0,0 @@ |
1 | -) |
colab/utils/tests/test_conf.py
... | ... | @@ -30,9 +30,11 @@ class TestConf(TestCase): |
30 | 30 | _load_py_file, 'settings_test', '/etc/colab/') |
31 | 31 | |
32 | 32 | def test_load_py_file_with_syntax_error(self): |
33 | + with file('/tmp/settings_with_syntax_error.py', 'w') as temp_settings: | |
34 | + temp_settings.write('(') | |
35 | + | |
33 | 36 | self.assertRaises(InaccessibleSettings, |
34 | - _load_py_file, 'settings_with_syntax_error', | |
35 | - test_files_dir) | |
37 | + _load_py_file, 'settings_with_syntax_error', '/tmp') | |
36 | 38 | |
37 | 39 | def test_load_py_file(self): |
38 | 40 | py_settings = _load_py_file('colab_settings', test_files_dir) | ... | ... |