~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/tests/test_archive.py

[r=benji][bug=848097] add another filter to
        IArchive.getPublishedSources;
        make it possible to filter by component name

Show diffs side-by-side

added added

removed removed

Lines of Context:
2006
2006
             PackagePublishingPocket.UPDATES],
2007
2007
            [source.pocket for source in filtered])
2008
2008
 
 
2009
    def test_filter_by_component_name(self):
 
2010
        # getPublishedSources() can be filtered by component name.
 
2011
        distroseries = self.factory.makeDistroSeries()
 
2012
        for component in getUtility(IComponentSet):
 
2013
            self.factory.makeSourcePackagePublishingHistory(
 
2014
                distroseries=distroseries,
 
2015
                component=component,
 
2016
                )
 
2017
        [filtered] = distroseries.main_archive.getPublishedSources(
 
2018
            component_name='universe')
 
2019
        self.assertEqual('universe', filtered.component.name)
 
2020
 
2009
2021
 
2010
2022
class TestSyncSourceFeatureFlag(TestCaseWithFactory):
2011
2023