コード例 #1
0
ファイル: test_task.py プロジェクト: qarnot/qarnot-sdk-python
    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
コード例 #2
0
    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
コード例 #3
0
ファイル: test_task.py プロジェクト: qarnot/qarnot-sdk-python
 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
コード例 #4
0
 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