def test_task_update(self): task = self._create_task({}) db.task_update(task['uuid'], {'failed': True}) db_task = self._get_task(task['uuid']) self.assertTrue(db_task['failed'])
def test_task_update_all_stats(self): _uuid = self._create_task({})['uuid'] for status in consts.TaskStatus: db.task_update(_uuid, {'status': status}) db_task = self._get_task(_uuid) self.assertEqual(db_task['status'], status)
def test_task_update_all_stats(self): _uuid = self._create_task({})["uuid"] for status in consts.TaskStatus: db.task_update(_uuid, {"status": status}) db_task = self._get_task(_uuid) self.assertEqual(db_task["status"], status)
def _update(self, values): if not self.fake: self.task = db.task_update(self.task["uuid"], values)
def _update(self, values): self.task = db.task_update(self.task['uuid'], values)
def test_task_update(self): task = self._create_task({}) db.task_update(task["uuid"], {"status": consts.TaskStatus.FAILED}) db_task = self._get_task(task["uuid"]) self.assertEqual(db_task["status"], consts.TaskStatus.FAILED)
def test_task_update(self): task = self._create_task({}) db.task_update(task["uuid"], {"failed": True}) db_task = self._get_task(task["uuid"]) self.assertTrue(db_task["failed"])