def test_task_are_in_task_to_json(self, mock_conn): task = Task(mock_conn, "task-name") task.completion_ttl = "4.11:08:06" task.auto_delete = True json_task = task._to_json() # pylint: disable=protected-access assert json_task['completionTimeToLive'] == '4.11:08:06' assert json_task['autoDeleteOnCompletion'] is True
def test_task_are_in_task_to_json(self): task = Task(self.conn, "task-name") task.completion_ttl = "4.11:08:06" task.auto_delete = True json_task = task._to_json() assert json_task['completionTimeToLive'] == '4.11:08:06' assert json_task['autoDeleteOnCompletion'] == True
def test_task_autodelete_set_get(self, mock_conn): task = Task(mock_conn, "task-name") task.auto_delete = False assert task.auto_delete is False task.auto_delete = True assert task.auto_delete is True
def test_task_autodelete_set_get(self): task = Task(self.conn, "task-name") task.auto_delete = False assert False == task.auto_delete task.auto_delete = True assert True == task.auto_delete