Exemplo n.º 1
0
    def test_list(self, mock_get_by_resource, mock_validate_distributor):
        ret = RepoPublishScheduleManager.list('repo1', 'distributor1')

        mock_get_by_resource.assert_called_once_with(
            RepoDistributor.build_resource_tag('repo1', 'distributor1'))
        self.assertTrue(ret is mock_get_by_resource.return_value)
Exemplo n.º 2
0
    def test_validate_distributor(self, mock_get_by_resource,
                                  mock_validate_distributor):
        RepoPublishScheduleManager.list('repo1', 'distributor1')

        mock_validate_distributor.assert_called_once_with(
            'repo1', 'distributor1')
Exemplo n.º 3
0
    def test_validate_distributor(self, mock_get_by_resource, mock_validate_distributor):
        RepoPublishScheduleManager.list("repo1", "distributor1")

        mock_validate_distributor.assert_called_once_with("repo1", "distributor1")
Exemplo n.º 4
0
    def test_list(self, mock_get_by_resource, mock_validate_distributor):
        ret = RepoPublishScheduleManager.list("repo1", "distributor1")

        mock_get_by_resource.assert_called_once_with(RepoDistributor.build_resource_tag("repo1", "distributor1"))
        self.assertTrue(ret is mock_get_by_resource.return_value)
Exemplo n.º 5
0
 def test_list(self, mock_get_by_resource, m_dist_qs):
     ret = RepoPublishScheduleManager.list("repo1", "distributor1")
     mock_get_by_resource.assert_called_once_with(m_dist_qs.get_or_404.return_value.resource_tag)
     self.assertTrue(ret is mock_get_by_resource.return_value)