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_completion_ttl_set_get(self, mock_conn):
     task = Task(mock_conn, "task-name")
     task.completion_ttl = datetime.timedelta(days=2, hours=33, minutes=66, seconds=66)
     assert "3.10:07:06" == task.completion_ttl
     task.completion_ttl = "4.11:08:06"
     assert "4.11:08:06" == task.completion_ttl