Ejemplo n.º 1
0
    def setUp(self):
        created = ActionExecutionDB()
        created.action = {'uid': 'action:core:ask'}
        created.status = 'succeeded'
        created.runner = {'name': 'inquirer'}
        created.liveaction = INQUIRY_LIVEACTION
        created.result = INQUIRY_RESULT

        self.saved = ActionExecutionModelTest._save_execution(created)
        self.retrieved = ActionExecution.get_by_id(self.saved.id)
        self.assertEqual(self.saved.action, self.retrieved.action,
                         'Same action was not returned.')
Ejemplo n.º 2
0
    def setUp(self):

        self.executions = {}

        for name, execution in ACTIONEXECUTIONS.items():

            created = ActionExecutionDB()
            created.action = execution['action']
            created.status = execution['status']
            created.runner = execution['runner']
            created.liveaction = execution['liveaction']
            created.result = execution['result']

            saved = ActionExecutionModelTest._save_execution(created)
            retrieved = ActionExecution.get_by_id(saved.id)
            self.assertEqual(saved.action, retrieved.action,
                             'Same action was not returned.')

            self.executions[name] = retrieved
Ejemplo n.º 3
0
    def setUp(self):

        self.executions = {}

        for name, execution in ACTIONEXECUTIONS.items():

            created = ActionExecutionDB()
            created.action = execution['action']
            created.status = execution['status']
            created.runner = execution['runner']
            created.liveaction = execution['liveaction']
            created.result = execution['result']

            saved = ActionExecutionModelTest._save_execution(created)
            retrieved = ActionExecution.get_by_id(saved.id)
            self.assertEqual(saved.action, retrieved.action,
                             'Same action was not returned.')

            self.executions[name] = retrieved