#2916 [policy] use "name" in result of lookup_name for CGs
Merged a month ago by tkopecek. Opened a month ago by julian8628.
julian8628/koji issue/2915  into  master

file modified
+1 -1
@@ -9361,7 +9361,7 @@ 

      # pull cg info out

      # note that br_id will be None if a component had no buildroot

      if 'cg_list' in data:

-         cgs = [lookup_name('content_generator', cg, strict=True)

+         cgs = [lookup_name('content_generator', cg, strict=True)['name']

                 for cg in data['cg_list']]

          return set(cgs)

      # otherwise try buildroot data

@@ -136,11 +136,12 @@ 

                  'build': 'whatever',

                  'buildroots': [],



          def my_lookup_name(table, info, strict=False, create=False):

              self.assertEqual(strict, True)

              self.assertEqual(create, False)

              self.assertEqual(table, 'content_generator')

-             return "cg %i" % info

+             return {'id': info, 'name': "cg %i" % info}

          self.lookup_name.side_effect = my_lookup_name


          result = kojihub.policy_get_cgs(data)

Metadata Update from @mfilip:
- Pull-request tagged with: testing-ready

a month ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

a month ago

Commit 00ffe20 fixes this pull-request

Pull-Request has been merged by tkopecek

a month ago