def test_filter_distros_no_filter(self): """Check that if no filter is applied all distributions are used""" full_release = FullRelease() full_release.distributions = ['one', 'two', 'three', ] with OutputCapture(): full_release.filter_distros() self.assertEqual( full_release.distributions, ['one', 'two', 'three', ] )
def test_filter_multiple_filters(self): """Check that if multiple filters are passed they are correctly used """ full_release = FullRelease(filter_distributions=['w', 'h']) full_release.distributions = ['one', 'two', 'three', ] with OutputCapture(): full_release.filter_distros() self.assertEqual( full_release.distributions, ['three', 'two', ] )
def test_filter_distros_filter(self): """Check that if a filter is applied only the matching distributions are kept """ full_release = FullRelease(filter_distributions='w') full_release.distributions = ['one', 'two', 'three', ] with OutputCapture(): full_release.filter_distros() self.assertEqual( full_release.distributions, ['two', ] )