예제 #1
0
 def test_task_delete_with_results(self):
     task_id = self._create_task()['uuid']
     db.task_result_create(task_id, {task_id: task_id}, {task_id: task_id})
     res = db.task_result_get_all_by_uuid(task_id)
     self.assertEqual(len(res), 1)
     db.task_delete(task_id)
     res = db.task_result_get_all_by_uuid(task_id)
     self.assertEqual(len(res), 0)
예제 #2
0
 def test_task_delete_with_results(self):
     task_id = self._create_task()['uuid']
     db.task_result_create(task_id,
                           {task_id: task_id},
                           {task_id: task_id})
     res = db.task_result_get_all_by_uuid(task_id)
     self.assertEqual(len(res), 1)
     db.task_delete(task_id)
     res = db.task_result_get_all_by_uuid(task_id)
     self.assertEqual(len(res), 0)
예제 #3
0
    def test_task_get_detailed_last(self):
        task1 = self._create_task()
        key = {'name': 'atata'}
        data = {'a': 'b', 'c': 'd'}

        db.task_result_create(task1['uuid'], key, data)
        task1_full = db.task_get_detailed_last()
        results = task1_full["results"]
        self.assertEqual(len(results), 1)
        self.assertEqual(results[0]["key"], key)
        self.assertEqual(results[0]["data"], data)
예제 #4
0
    def test_task_get_detailed_last(self):
        task1 = self._create_task()
        key = {'name': 'atata'}
        data = {'a': 'b', 'c': 'd'}

        db.task_result_create(task1['uuid'], key, data)
        task1_full = db.task_get_detailed_last()
        results = task1_full["results"]
        self.assertEqual(len(results), 1)
        self.assertEqual(results[0]["key"], key)
        self.assertEqual(results[0]["data"], data)
예제 #5
0
    def test_task_get_detailed_last(self):
        task1 = self._create_task()
        key = {"name": "atata"}
        data = {"a": "b", "c": "d"}

        db.task_result_create(task1["uuid"], key, data)
        task1_full = db.task_get_detailed_last()
        results = task1_full["results"]
        self.assertEqual(len(results), 1)
        self.assertEqual(results[0]["key"], key)
        self.assertEqual(results[0]["data"], data)
예제 #6
0
    def test_task_get_detailed_last(self):
        task1 = self._create_task()
        key = {"name": "atata"}
        data = {"a": "b", "c": "d"}

        db.task_result_create(task1["uuid"], key, data)
        task1_full = db.task_get_detailed_last()
        results = task1_full["results"]
        self.assertEqual(len(results), 1)
        self.assertEqual(results[0]["key"], key)
        self.assertEqual(results[0]["data"], data)
예제 #7
0
    def test_task_result_get_all_by_uuid(self):
        task1 = self._create_task()['uuid']
        task2 = self._create_task()['uuid']

        for task_id in (task1, task2):
            db.task_result_create(task_id, {task_id: task_id},
                                  {task_id: task_id})

        for task_id in (task1, task2):
            res = db.task_result_get_all_by_uuid(task_id)
            data = {task_id: task_id}
            self.assertEqual(len(res), 1)
            self.assertEqual(res[0]['key'], data)
            self.assertEqual(res[0]['data'], data)
예제 #8
0
    def test_task_result_get_all_by_uuid(self):
        task1 = self._create_task()['uuid']
        task2 = self._create_task()['uuid']

        for task_id in (task1, task2):
            db.task_result_create(task_id,
                                  {task_id: task_id},
                                  {task_id: task_id})

        for task_id in (task1, task2):
            res = db.task_result_get_all_by_uuid(task_id)
            data = {task_id: task_id}
            self.assertEqual(len(res), 1)
            self.assertEqual(res[0]['key'], data)
            self.assertEqual(res[0]['data'], data)
예제 #9
0
파일: task.py 프로젝트: yongfengdu/rally
 def append_results(self, key, value):
     db.task_result_create(self.task["uuid"], key, value)
예제 #10
0
파일: task.py 프로젝트: hughsaunders/rally
 def append_results(self, key, value):
     db.task_result_create(self.task['uuid'], key, value)