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)
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")