def __init__(self, context): super(RepoHistorySection, self).__init__('history', _('show sync and publish history')) self.context = context self.prompt = context.prompt self.add_command(history_commands.SyncHistoryCommand(context)) self.add_command(history_commands.PublishHistoryCommand(context))
def setUp(self): super(PublishHistoryCommandTests, self).setUp() self.command = history.PublishHistoryCommand(self.context) self.arguments = { OPTION_REPO_ID.keyword: 'test-repo', history.OPTION_DISTRIBUTOR_ID.keyword: 'test-distrib', history.OPTION_LIMIT.keyword: None, history.OPTION_SORT.keyword: None, history.OPTION_START_DATE.keyword: None, history.OPTION_END_DATE.keyword: None, history.FLAG_DETAILS.keyword: False } self.server_mock.request.return_value = 200, []