diff --git a/hub/kojihub.py b/hub/kojihub.py index 68c06f53..5932415d 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -11830,12 +11830,7 @@ class RootExports(object): def distRepo(self, tag, keys, **task_opts): """Create a dist-repo task. returns task id""" if not context.session.hasPerm('dist-repo') and not context.session.hasPerm('admin'): - policy_data = { - 'tag': tag, - 'keys': keys, - } - assert_policy('dist_repo', policy_data) - + assert_policy('dist_repo', {'tag': tag}) repo_id, event_id = dist_repo_init(tag, keys, task_opts) task_opts['event'] = event_id # cancel potentially running distRepos diff --git a/tests/test_hub/test_dist_repo.py b/tests/test_hub/test_dist_repo.py index 2cf10608..92e34bfa 100644 --- a/tests/test_hub/test_dist_repo.py +++ b/tests/test_hub/test_dist_repo.py @@ -104,7 +104,7 @@ class TestDistRepo(unittest.TestCase): ret = exports.distRepo('tag', 'keys') session.hasPerm.has_calls(mock.call('dist_repo'), mock.call('admin')) - assert_policy.assert_called_once_with('dist_repo', {'tag': 'tag', 'keys': 'keys'}) + assert_policy.assert_called_once_with('dist_repo', {'tag': 'tag'}) dist_repo_init.assert_called_once() make_task.assert_called_once() self.assertEquals(ret, make_task.return_value)