def assertSeriesBranches(self, expected, branch_ids=None): """Assert that the expected series are returned.""" if branch_ids is None: branch_ids = self.branch_ids series = BranchListingQueryOptimiser.getProductSeriesForBranches( branch_ids) self.assertEqual(expected, list(series))