def take_action(self, args): columns = ['display_date', 'author', 'version', 'text'] result = api.changelog( args.package, rows_per_page=args.rows_per_page, start_row=args.start_row, ) rows = result['rows'] return ( columns, [[row.get(col, '') for col in columns] for row in rows], )
def test_changelog(self): """ Test the changelog function from the API. """ guake_changelog = changelog(PKG) self.assertTrue(len(guake_changelog['rows']) > 0) expected_keys = [six.u(key) for key in [ 'display_date', 'author', 'text', 'date_ts', 'version', 'date', 'email', ]] self.assert_keys_in_dict(guake_changelog['rows'][0], expected_keys)
def take_action(self, args): columns = ["display_date", "author", "version", "text"] result = api.changelog(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])