Exemplo n.º 1
0
 def test_builds_completed(self):
     """ Test the builds function from the API for the builds that
     completed.
     """
     guake_build = builds(PKG, state='1')
     self.assertEqual(guake_build['rows'][0]['state_str'], 'complete')
     self.assertEqual(guake_build['rows'][0]['package_id'], 6454)
     self.assertEqual(guake_build['rows'][0]['owner_name'], 'pingou')
Exemplo n.º 2
0
 def take_action(self, args):
     columns = ["build id", "name-version-release", "state", "build time", "when", "owner"]
     result = api.builds(args.package, args.state, rows_per_page=args.rows_per_page, start_row=args.start_row)
     rows = result["rows"]
     return (
         columns,
         [
             [
                 build["build_id"],
                 build["nvr"],
                 build["state_str"],
                 build["completion_time_display"]["elapsed"],
                 build["completion_time_display"]["when"],
                 build["owner_name"],
             ]
             for build in rows
         ],
     )
Exemplo n.º 3
0
 def take_action(self, args):
     columns = [
         'build id', 'name-version-release', 'state', 'build time', 'when',
         'owner'
     ]
     result = api.builds(
         args.package,
         args.state,
         rows_per_page=args.rows_per_page,
         start_row=args.start_row,
     )
     rows = result['rows']
     return (columns, [[
         build['build_id'],
         build['nvr'],
         build['state_str'],
         build['completion_time_display']['elapsed'],
         build['completion_time_display']['when'],
         build['owner_name'],
     ] for build in rows])
Exemplo n.º 4
0
 def take_action(self, args):
     columns = ['build id', 'name-version-release', 'state',
                'build time', 'when', 'owner']
     result = api.builds(
         args.package,
         args.state,
         rows_per_page=args.rows_per_page,
         start_row=args.start_row,
     )
     rows = result['rows']
     return (
         columns,
         [[
             build['build_id'],
             build['nvr'],
             build['state_str'],
             build['completion_time_display']['elapsed'],
             build['completion_time_display']['when'],
             build['owner_name'],
         ] for build in rows]
     )
Exemplo n.º 5
0
 def test_builds(self):
     """ Test the builds function from the API. """
     guake_build = builds(PKG, state='all')
     self.assertEqual(guake_build['rows'][0]['package_name'], PKG)
     self.assertEqual(guake_build['rows'][0]['owner_name'], 'pingou')
     self.assertEqual(guake_build['rows'][0]['package_id'], 6454)