def test_releases(self): """ Test the releases function from the API. """ guake_releases = releases(PKG) expected_keys = [six.u(key) for key in [ 'release', 'testing_version', 'stable_version' ]] self.assert_keys_in_dict(guake_releases['rows'][0], expected_keys) self.assertEqual(guake_releases['rows'][0]['release'], 'Rawhide')
def take_action(self, args): columns = ['release', 'stable_version', 'testing_version'] result = api.releases( args.package, rows_per_page=args.rows_per_page, start_row=args.start_row, ) rows = result['rows'] return ( columns, [[row[col] for col in columns] for row in rows], )
def take_action(self, args): columns = ["release", "stable_version", "testing_version"] result = api.releases(args.package, rows_per_page=args.rows_per_page, start_row=args.start_row) rows = result["rows"] return (columns, [[row[col] for col in columns] for row in rows])