Ejemplo n.º 1
0
 def _create_project(self):
     """Create and return a test project"""
     project = ChartProject();
     project.name = 'test'
     project.start_date = date.today()
     project.end_date = date.today() + timedelta(days=30)
     project.admin = self.user;
     project.save()
     return project
Ejemplo n.º 2
0
 def create_project(self, new_name=None):
     """ Create the project defined by self.dataset.project_data in the
     database. If new_name is provided, the name of the project will be this
     value instead of *test_project*."""
     project = ChartProject(**self.dataset.project_data)
     if new_name:
         project.name = new_name
     project.admin = self.dataset.user
     project.save()
     return project