示例#1
0
    def test_update_overrides(self, mock_get_importer, mock_update):
        mock_get_importer.return_value = {'id': self.importer}

        RepoSyncScheduleManager.update(self.repo, self.importer, self.schedule_id,
                                       {'override_config': {'foo': 'bar'}})

        mock_update.assert_called_once_with(self.schedule_id,
                                            {'kwargs': {'overrides': {'foo': 'bar'}}})
示例#2
0
    def test_validate_options(self, mock_get_importer, mock_validate_options,
                              mock_update):
        mock_get_importer.return_value = {'id': self.importer}

        RepoSyncScheduleManager.update(self.repo, self.importer,
                                       self.schedule_id, self.updates)

        mock_validate_options.assert_called_once_with(self.updates)
示例#3
0
文件: test_repo.py 项目: pcreech/pulp
    def test_update(self, mock_update, mock_valid_imp):
        ret = RepoSyncScheduleManager.update(self.repo, self.importer, self.schedule_id, self.updates)

        mock_update.assert_called_once_with(self.schedule_id, self.updates)
        mock_valid_imp.assert_called_once_with(self.repo, self.importer)
        # make sure it passes through the return value from utils.update
        self.assertEqual(ret, mock_update.return_value)
示例#4
0
    def test_update(self, mock_get_importer, mock_update):
        mock_get_importer.return_value = {'id': self.importer}

        ret = RepoSyncScheduleManager.update(self.repo, self.importer,
                                             self.schedule_id, self.updates)

        mock_update.assert_called_once_with(self.schedule_id, self.updates)
        # make sure it passes through the return value from utils.update
        self.assertEqual(ret, mock_update.return_value)
示例#5
0
    def test_update_overrides(self, mock_get_importer, mock_update):
        mock_get_importer.return_value = {"id": self.importer}

        RepoSyncScheduleManager.update(self.repo, self.importer, self.schedule_id, {"override_config": {"foo": "bar"}})

        mock_update.assert_called_once_with(self.schedule_id, {"kwargs": {"overrides": {"foo": "bar"}}})
示例#6
0
    def test_validate_options(self, mock_get_importer, mock_validate_options, mock_update):
        mock_get_importer.return_value = {"id": self.importer}

        RepoSyncScheduleManager.update(self.repo, self.importer, self.schedule_id, self.updates)

        mock_validate_options.assert_called_once_with(self.updates)
示例#7
0
文件: test_repo.py 项目: pcreech/pulp
 def test_validate_options(self, mock_validate_options, mock_update, mock_valid_imp):
     RepoSyncScheduleManager.update(self.repo, self.importer, self.schedule_id, self.updates)
     mock_validate_options.assert_called_once_with(self.updates)
示例#8
0
文件: test_repo.py 项目: pcreech/pulp
    def test_update_overrides(self, mock_update, mock_valid_imp):
        RepoSyncScheduleManager.update(self.repo, self.importer, self.schedule_id, {"override_config": {"foo": "bar"}})

        mock_update.assert_called_once_with(self.schedule_id, {"kwargs": {"overrides": {"foo": "bar"}}})