Пример #1
0
 def test_parser(self):
     """
     Parse the output of the ``concatenate`` action.
     """
     _, parser = actions.concatenate(
         [u'http://example.com/input1', u'http://example.com/input2'])
     result = {u'links': {u'result': [u'http://example.com/output1']}}
     self.assertThat(parser(result), Equals(u'http://example.com/output1'))
Пример #2
0
 def test_parser(self):
     """
     Parse the output of the ``concatenate`` action.
     """
     _, parser = actions.concatenate([u'http://example.com/input1',
                                      u'http://example.com/input2'])
     result = {u'links': {u'result': [u'http://example.com/output1']}}
     self.assertThat(
         parser(result),
         Equals(u'http://example.com/output1'))
Пример #3
0
 def test_action(self):
     """
     Construct a ``concatenate`` action..
     """
     action, _ = actions.concatenate([u'http://example.com/input1',
                                      u'http://example.com/input2'])
     self.assertThat(
         action,
         Equals({u'action': u'concatenate',
                 u'parameters': {
                     u'inputs': [u'http://example.com/input1',
                                 u'http://example.com/input2']}}))
Пример #4
0
 def test_action(self):
     """
     Construct a ``concatenate`` action..
     """
     action, _ = actions.concatenate(
         [u'http://example.com/input1', u'http://example.com/input2'])
     self.assertThat(
         action,
         Equals({
             u'action': u'concatenate',
             u'parameters': {
                 u'inputs': [
                     u'http://example.com/input1',
                     u'http://example.com/input2'
                 ]
             }
         }))