Commit 078f21cab98c5505fccad5de40ffa0f561020bc7

Authored by Sergio Oliveira
1 parent ec901aba

Write settings with syntax error on /tmp

The .py file into the repo was preventing us to generate RPM packages
colab/utils/tests/settings_with_syntax_error.py
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -)  
colab/utils/tests/test_conf.py
@@ -30,9 +30,11 @@ class TestConf(TestCase): @@ -30,9 +30,11 @@ class TestConf(TestCase):
30 _load_py_file, 'settings_test', '/etc/colab/') 30 _load_py_file, 'settings_test', '/etc/colab/')
31 31
32 def test_load_py_file_with_syntax_error(self): 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 self.assertRaises(InaccessibleSettings, 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 def test_load_py_file(self): 39 def test_load_py_file(self):
38 py_settings = _load_py_file('colab_settings', test_files_dir) 40 py_settings = _load_py_file('colab_settings', test_files_dir)