Changeset 10348 for main/waeup.cas/trunk/waeup/cas/tests
- Timestamp:
- 22 Jun 2013, 21:35:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/tests/test_server.py
r10335 r10348 11 11 12 12 def setUp(self): 13 self.workdir = tempfile.mkdtemp() 13 # Create a new location where tempfiles are created. This way 14 # also temporary dirs of local CASServers can be removed on 15 # tear-down. 16 self._new_tmpdir = tempfile.mkdtemp() 17 self._old_tmpdir = tempfile.tempdir 18 tempfile.tempdir = self._new_tmpdir 19 self.workdir = os.path.join(self._new_tmpdir, 'home') 20 self.db_path = os.path.join(self.workdir, 'mycas.db') 14 21 self.paste_conf1 = os.path.join( 15 22 os.path.dirname(__file__), 'sample1.ini') 16 23 17 24 def tearDown(self): 18 shutil.rmtree(self.workdir) 25 # remove local tempfile and reset old tempdir setting 26 if os.path.isdir(self._new_tmpdir): 27 shutil.rmtree(self._new_tmpdir) 28 tempfile.tempdir = self._old_tmpdir 19 29 20 30 def test_paste_deploy_loader(self):
Note: See TracChangeset for help on using the changeset viewer.