drop "keys" field
This commit is contained in:
parent
09da0aa1e4
commit
7970e78092
2 changed files with 2 additions and 7 deletions
|
|
@ -11830,12 +11830,7 @@ class RootExports(object):
|
||||||
def distRepo(self, tag, keys, **task_opts):
|
def distRepo(self, tag, keys, **task_opts):
|
||||||
"""Create a dist-repo task. returns task id"""
|
"""Create a dist-repo task. returns task id"""
|
||||||
if not context.session.hasPerm('dist-repo') and not context.session.hasPerm('admin'):
|
if not context.session.hasPerm('dist-repo') and not context.session.hasPerm('admin'):
|
||||||
policy_data = {
|
assert_policy('dist_repo', {'tag': tag})
|
||||||
'tag': tag,
|
|
||||||
'keys': keys,
|
|
||||||
}
|
|
||||||
assert_policy('dist_repo', policy_data)
|
|
||||||
|
|
||||||
repo_id, event_id = dist_repo_init(tag, keys, task_opts)
|
repo_id, event_id = dist_repo_init(tag, keys, task_opts)
|
||||||
task_opts['event'] = event_id
|
task_opts['event'] = event_id
|
||||||
# cancel potentially running distRepos
|
# cancel potentially running distRepos
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ class TestDistRepo(unittest.TestCase):
|
||||||
ret = exports.distRepo('tag', 'keys')
|
ret = exports.distRepo('tag', 'keys')
|
||||||
|
|
||||||
session.hasPerm.has_calls(mock.call('dist_repo'), mock.call('admin'))
|
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()
|
dist_repo_init.assert_called_once()
|
||||||
make_task.assert_called_once()
|
make_task.assert_called_once()
|
||||||
self.assertEquals(ret, make_task.return_value)
|
self.assertEquals(ret, make_task.return_value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue