Пример #1
0
 def tearDown(self):
     """
     delete all files in tests/temp_files such that they are not synchronized by git
     """
     super(TestCurvestore, self).tearDown()
     models.MEDIA_ROOT = self.old_media_root
     settings.MEDIA_ROOT = self.old_media_root
     shutil.rmtree(self.new_media_root)
     CurveDB.set_root_curve(self.rootcurve)
Пример #2
0
 def setUp(self):
     """
     Sets the file folder to tests/temp_files to not add data files in teh normal file
     system tree
     """
     super(TestCurvestore, self).setUp()
     if not osp.exists(self.new_media_root):
         os.mkdir(self.new_media_root)
     models.MEDIA_ROOT = self.new_media_root
     settings.MEDIA_ROOT = self.new_media_root
     self.rootcurve = CurveDB.get_root_curve()
     CurveDB.set_root_curve(None)
 def set_as_root(dummy, curves=curves):
     CurveDB.set_root_curve(curves[0])