예제 #1
0
파일: test_repo.py 프로젝트: credativ/pulp
    def test_update_overrides(self, mock_get_distributor, mock_update):
        mock_get_distributor.return_value = None

        RepoPublishScheduleManager.update(
            self.repo, self.distributor, self.schedule_id, {"override_config": {"foo": "bar"}}
        )

        mock_update.assert_called_once_with(self.schedule_id, {"kwargs": {"overrides": {"foo": "bar"}}})
예제 #2
0
파일: test_repo.py 프로젝트: zjhuntin/pulp
    def test_validate_options(self, mock_get_distributor,
                              mock_validate_options, mock_update):
        mock_get_distributor.return_value = {'id': self.distributor}

        RepoPublishScheduleManager.update(self.repo, self.distributor,
                                          self.schedule_id, self.updates)

        mock_validate_options.assert_called_once_with(self.updates)
예제 #3
0
    def test_update_overrides(self, mock_get_distributor, mock_update):
        mock_get_distributor.return_value = None

        RepoPublishScheduleManager.update(self.repo, self.distributor, self.schedule_id,
                                       {'override_config': {'foo': 'bar'}})

        mock_update.assert_called_once_with(self.schedule_id,
                                            {'kwargs': {'overrides': {'foo': 'bar'}}})
예제 #4
0
파일: test_repo.py 프로젝트: credativ/pulp
    def test_update(self, mock_get_distributor, mock_update):
        mock_get_distributor.return_value = {"id": self.distributor}

        ret = RepoPublishScheduleManager.update(self.repo, self.distributor, 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(self, mock_get_distributor, mock_update):
        mock_get_distributor.return_value = {'id': self.distributor}

        ret = RepoPublishScheduleManager.update(self.repo, self.distributor, 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)
예제 #6
0
파일: test_repo.py 프로젝트: credativ/pulp
    def test_validate_options(self, mock_get_distributor, mock_validate_options, mock_update):
        mock_get_distributor.return_value = {"id": self.distributor}

        RepoPublishScheduleManager.update(self.repo, self.distributor, 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, m_dist_qs):
     RepoPublishScheduleManager.update(self.repo, self.distributor, self.schedule_id, self.updates)
     mock_validate_options.assert_called_once_with(self.updates)