コード例 #1
0
    def test_rpm_next_run_command(self):
        for action in SCHEDULE_INSTALL_ACTIONS:
            command = consumer_content.ConsumerContentNextRunCommand(self.context, action=action)

            self.assertTrue(isinstance(command, NextRunCommand))
            self.assertTrue(OPTION_CONSUMER_ID in command.options)
            self.assertEqual(command.name, 'next')
            self.assertTrue(action in command.description)
コード例 #2
0
    def __init__(self, context, action):
        description = _('manage consumer package %s schedules' % action)
        super(YumConsumerSchedulesSection, self).__init__('schedules', description)

        self.add_command(consumer_content.ConsumerContentListScheduleCommand(context, action))
        self.add_command(YumConsumerContentCreateScheduleCommand(context, action, TYPE_ID_RPM))
        self.add_command(consumer_content.ConsumerContentDeleteScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentUpdateScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentNextRunCommand(context, action))
コード例 #3
0
ファイル: errata.py プロジェクト: ulif/pulp_rpm
    def __init__(self, context, action):
        description = _('manage consumer errata %s schedules' % action)
        super(self.__class__, self).__init__('schedules', description)

        self.add_command(consumer_content.ConsumerContentListScheduleCommand(context, action))
        self.add_command(YumConsumerContentCreateScheduleCommand(context, action, TYPE_ID_ERRATA))
        self.add_command(consumer_content.ConsumerContentDeleteScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentUpdateScheduleCommand(context, action))
        self.add_command(consumer_content.ConsumerContentNextRunCommand(context, action))
コード例 #4
0
 def test_next_run(self):
     try:
         consumer_content.ConsumerContentNextRunCommand(
             self.mock_context, self.action)
     except Exception, e:
         self.fail(str(e))