def test_execution_delete(self):
        created = db_api.execution_create(EXECUTIONS[0]['workbook_name'],
                                          EXECUTIONS[0])
        self.assertIsInstance(created, dict)

        fetched = db_api.execution_get(EXECUTIONS[0]['workbook_name'],
                                       created['id'])
        self.assertIsInstance(fetched, dict)
        self.assertDictEqual(created, fetched)

        db_api.execution_delete(EXECUTIONS[0]['workbook_name'],
                                created['id'])
        self.assertIsNone(db_api.execution_get(EXECUTIONS[0]['workbook_name'],
                                               created['id']))
    def test_execution_delete(self):
        created = db_api.execution_create(EXECUTIONS[0]['workbook_name'],
                                          EXECUTIONS[0])
        self.assertIsInstance(created, dict)

        fetched = db_api.execution_get(EXECUTIONS[0]['workbook_name'],
                                       created['id'])
        self.assertIsInstance(fetched, dict)
        self.assertDictEqual(created, fetched)

        db_api.execution_delete(EXECUTIONS[0]['workbook_name'], created['id'])
        self.assertIsNone(
            db_api.execution_get(EXECUTIONS[0]['workbook_name'],
                                 created['id']))
Ejemplo n.º 3
0
    def test_execution_update(self):
        created = db_api.execution_create(EXECUTIONS[0]['workbook_name'],
                                          EXECUTIONS[0])
        self.assertIsInstance(created, dict)

        updated = db_api.execution_update(created['id'],
                                          {'task': 'task10'})
        self.assertIsInstance(updated, dict)
        self.assertEqual('task10', updated['task'])

        fetched = db_api.execution_get(created['id'])
        self.assertDictEqual(updated, fetched)
    def test_execution_update(self):
        created = db_api.execution_create(EXECUTIONS[0]['workbook_name'],
                                          EXECUTIONS[0])
        self.assertIsInstance(created, dict)

        updated = db_api.execution_update(EXECUTIONS[0]['workbook_name'],
                                          created['id'], {'task': 'task10'})
        self.assertIsInstance(updated, dict)
        self.assertEqual('task10', updated['task'])

        fetched = db_api.execution_get(EXECUTIONS[0]['workbook_name'],
                                       created['id'])
        self.assertDictEqual(updated, fetched)
Ejemplo n.º 5
0
    def test_execution_delete(self):
        created = db_api.execution_create(EXECUTIONS[0]['workbook_name'],
                                          EXECUTIONS[0])
        self.assertIsInstance(created, dict)

        fetched = db_api.execution_get(created['id'])
        self.assertIsInstance(fetched, dict)
        self.assertDictEqual(created, fetched)

        db_api.execution_delete(created['id'])
        self.assertRaises(exc.NotFoundException,
                          db_api.execution_get,
                          created['id'])