예제 #1
0
 def test_activity_tasks_from_input(self, decider):
     d =  {'activity_tasks': [{'id_': 'fileLength:1:2be88ca424:d',
                                       'name': 'fileLength',
                                       'domain': 'd',
                                       'type': 'floto.specs.task.ActivityTask',
                                       'version': '1'}]}
     t = (decider.get_activity_tasks_from_input(d))
     assert isinstance(t[0], floto.specs.task.ActivityTask)
     assert t[0].name == 'fileLength'
예제 #2
0
 def test_activity_tasks_from_input_child_workflow(self, decider):
     d = {'copyFiles:1:15fbe8eeaa': ['/path/to/data/2016-03-06.json'],
          'child_workflow_task': {'activity_tasks': [{'id_': 'fileLength:1:2be88ca424:d',
                                          'name': 'fileLength',
                                          'domain': 'd',
                                          'type': 'floto.specs.task.ActivityTask',
                                          'version': '1'}]}}
     t = (decider.get_activity_tasks_from_input(d))
     assert isinstance(t[0], floto.specs.task.ActivityTask)
     assert t[0].name == 'fileLength'
예제 #3
0
 def test_activity_tasks_from_input(self, decider):
     d = {
         'activity_tasks': [{
             'id_': 'fileLength:1:2be88ca424:d',
             'name': 'fileLength',
             'domain': 'd',
             'type': 'floto.specs.task.ActivityTask',
             'version': '1'
         }]
     }
     t = (decider.get_activity_tasks_from_input(d))
     assert isinstance(t[0], floto.specs.task.ActivityTask)
     assert t[0].name == 'fileLength'
예제 #4
0
 def test_activity_tasks_from_input_child_workflow(self, decider):
     d = {
         'copyFiles:1:15fbe8eeaa': ['/path/to/data/2016-03-06.json'],
         'child_workflow_task': {
             'activity_tasks': [{
                 'id_': 'fileLength:1:2be88ca424:d',
                 'name': 'fileLength',
                 'domain': 'd',
                 'type': 'floto.specs.task.ActivityTask',
                 'version': '1'
             }]
         }
     }
     t = (decider.get_activity_tasks_from_input(d))
     assert isinstance(t[0], floto.specs.task.ActivityTask)
     assert t[0].name == 'fileLength'