equal
deleted
inserted
replaced
201 if sys.modules.pop('cubes.file', None) and PY3: |
201 if sys.modules.pop('cubes.file', None) and PY3: |
202 del cubes.file |
202 del cubes.file |
203 from cubes import file |
203 from cubes import file |
204 self.assertEqual(file.__path__, [join(self.custom_cubes_dir, 'file')]) |
204 self.assertEqual(file.__path__, [join(self.custom_cubes_dir, 'file')]) |
205 |
205 |
|
206 def test_config_value_from_environment(self): |
|
207 self.assertIsNone(self.config['base-url']) |
|
208 os.environ['CW_BASE_URL'] = 'https://www.cubicweb.org' |
|
209 try: |
|
210 self.assertEqual(self.config['base-url'], |
|
211 'https://www.cubicweb.org') |
|
212 finally: |
|
213 del os.environ['CW_BASE_URL'] |
|
214 |
206 |
215 |
207 class FindPrefixTC(unittest.TestCase): |
216 class FindPrefixTC(unittest.TestCase): |
208 def make_dirs(self, *args): |
217 def make_dirs(self, *args): |
209 path = join(tempfile.tempdir, *args) |
218 path = join(tempfile.tempdir, *args) |
210 if not os.path.exists(path): |
219 if not os.path.exists(path): |