def test_get_segment_allocation_ranges(self): sa_range = self._create_segment_allocation_range() sa_range2 = self._create_segment_allocation_range(first_id=6, last_id=10) result = sa_ranges_api.get_segment_allocation_ranges(self.context) ex_result = [self._sa_range_to_dict(r) for r in [sa_range, sa_range2]] self.assertEqual(ex_result, result)
def test_get_segment_allocation_ranges(self): sa_range = self._create_segment_allocation_range() sa_range2 = self._create_segment_allocation_range(first_id=6, last_id=10) result = sa_ranges_api.get_segment_allocation_ranges(self.context) ex_result = [self._sa_range_to_dict(r) for r in [sa_range, sa_range2]] self.assertEqual(ex_result, result)
def get_segment_allocation_ranges(self, context, **filters): return segment_allocation_ranges.get_segment_allocation_ranges( context, **filters)
def test_get_segment_allocation_ranges_empty(self): result = sa_ranges_api.get_segment_allocation_ranges(self.context) self.assertEqual([], result)
def test_get_segment_allocation_ranges_empty(self): result = sa_ranges_api.get_segment_allocation_ranges(self.context) self.assertEqual([], result)
def get_segment_allocation_ranges(self, context, **filters): return segment_allocation_ranges.get_segment_allocation_ranges( context, **filters)