def test_action(self): """ Construct a ``metadata`` action.. """ action, _ = actions.metadata(u'http://example.com/input1') self.assertThat( action, Equals({u'action': u'metadata', u'parameters': { u'input': u'http://example.com/input1'}}))
def test_parser(self): """ Parse the output of the ``metadata`` action. """ _, parser = actions.metadata(u'http://example.com/input1') result = {u'body': {u'page-count': 3, u'title': u'Hello World'}} self.assertThat(parser(result), Equals({ u'page-count': 3, u'title': u'Hello World' }))
def test_parser(self): """ Parse the output of the ``metadata`` action. """ _, parser = actions.metadata(u'http://example.com/input1') result = {u'body': {u'page-count': 3, u'title': u'Hello World'}} self.assertThat( parser(result), Equals({u'page-count': 3, u'title': u'Hello World'}))
def test_action(self): """ Construct a ``metadata`` action.. """ action, _ = actions.metadata(u'http://example.com/input1') self.assertThat( action, Equals({ u'action': u'metadata', u'parameters': { u'input': u'http://example.com/input1' } }))