示例#1
0
    def test_save_project_status(self):
        statuses = projects_service.save_project_status(["Frozen", "Postponed"])
        self.assertEqual(len(statuses), 2)
        statuses = ProjectStatus.query.all()
        self.assertEqual(len(statuses), 4)

        statuses = projects_service.save_project_status(["Frozen", "Postponed"])
        self.assertEqual(len(statuses), 2)
        statuses = ProjectStatus.query.all()
        self.assertEqual(len(statuses), 4)
示例#2
0
文件: project.py 项目: tokejepsen/zou
 def prepare_import(self):
     self.project_status_names = self.extract_status_names(self.sg_entries)
     projects_service.save_project_status(self.project_status_names)
     self.project_status_map = ProjectStatus.get_id_map(field="name")