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)
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')
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")
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)
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)