def take_action(self, args): result = api.contents( args.package, release=args.release, ) self._recursive_print(result) sys.exit(0)
def take_action(self, args): result = api.contents( args.package, arch=args.arch, release=args.release, ) self._recursive_print(result) sys.exit(0)
def test_contents(self): """ Test the contents function from the API. """ guake_contents = contents(PKG) expected_keys = [six.u('state'), six.u('data'), six.u('children')] self.assert_keys_in_dict(guake_contents[0], expected_keys) self.assertEqual(guake_contents[0]['state'], 'open') expected_data = { six.u('icon'): six.u('jstree-directory'), six.u('title'): six.u('usr') } self.assertEqual(guake_contents[0]['data'], expected_data)