Esempio n. 1
0
 def test_parser(self):
     """
     Parse the output of the ``crush`` action.
     """
     _, parser = actions.crush(u'http://example.com/input1', u'text')
     result = {u'links': {u'result': [u'http://example.com/output1']}}
     self.assertThat(parser(result), Equals(u'http://example.com/output1'))
Esempio n. 2
0
 def test_parser(self):
     """
     Parse the output of the ``crush`` action.
     """
     _, parser = actions.crush(u'http://example.com/input1', u'text')
     result = {u'links': {u'result': [u'http://example.com/output1']}}
     self.assertThat(
         parser(result),
         Equals(u'http://example.com/output1'))
Esempio n. 3
0
 def test_action(self):
     """
     Construct a ``crush`` action..
     """
     action, _ = actions.crush(u'http://example.com/input1', u'text')
     self.assertThat(
         action,
         Equals({u'action': u'crush',
                 u'parameters': {
                     u'input': u'http://example.com/input1',
                     u'compression-profile': u'text'}}))
Esempio n. 4
0
 def test_action(self):
     """
     Construct a ``crush`` action..
     """
     action, _ = actions.crush(u'http://example.com/input1', u'text')
     self.assertThat(
         action,
         Equals({
             u'action': u'crush',
             u'parameters': {
                 u'input': u'http://example.com/input1',
                 u'compression-profile': u'text'
             }
         }))