use name_or_id_clause in get_channel

This commit is contained in:
Mike McLean 2021-11-10 13:31:46 -05:00 committed by Tomas Kopecek
parent bcf423362b
commit 920f9b01be
2 changed files with 6 additions and 12 deletions

View file

@ -20,12 +20,12 @@ class TestGetChannel(unittest.TestCase):
channel_info = {'channel': 'val'}
with self.assertRaises(koji.GenericError) as cm:
self.exports.getChannel(channel_info)
self.assertEqual('Invalid type for channelInfo: %s' % type(channel_info),
self.assertEqual('Invalid name or id value: %s' % channel_info,
str(cm.exception))
# list
channel_info = ['channel']
with self.assertRaises(koji.GenericError) as cm:
self.exports.getChannel(channel_info)
self.assertEqual('Invalid type for channelInfo: %s' % type(channel_info),
self.assertEqual('Invalid name or id value: %s' % channel_info,
str(cm.exception))