예제 #1
0
 def take_action(self, args):
     result = api.history(
         args.package,
         rows_per_page=args.rows_per_page,
         page=args.page,
     )
     messages = result['raw_messages']
     return (
         ['date', 'event', 'link'],
         [[
             pkgwat.cli.utils._format_time(message['timestamp']),
             message['meta']['subtitle'],
             pkgwat.cli.utils._format_link(message['meta']['link']),
         ] for message in messages],
     )
예제 #2
0
 def take_action(self, args):
     result = api.history(
         args.package,
         rows_per_page=args.rows_per_page,
         page=args.page,
     )
     messages = result['raw_messages']
     return (
         ['date', 'event', 'link'],
         [[
             pkgwat.cli.utils._format_time(message['timestamp']),
             message['meta']['subtitle'],
             pkgwat.cli.utils._format_link(message['meta']['link']),
         ] for message in messages],
     )
예제 #3
0
 def test_history(self):
     """ Test the history function of the API. """
     results = history(PKG)
     assert len(results['raw_messages']) > 0