Skip to content

Commit

Permalink
Good test with limit = 50
Browse files Browse the repository at this point in the history
Bad test with limit = 10
  • Loading branch information
volkerjaenisch committed Aug 16, 2019
1 parent 6eaef16 commit 8a9608c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Products/ZCatalog/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,22 @@ def test_sort_on_two(self):
for x in range(self.upper):
self.assertEqual(a[x].num, x)

def test_sort_on_two2(self):
def test_sort_on_two_limit_10(self):
catalog = self._make_one(cls=Dummy2)
upper = self.upper
a = catalog(sort_on=('att1', 'num'), att1='att1', b_start=0, b_size=10)
self.assertEqual(len(a), 10)
for x in range(10):
self.assertEqual(a[x].num, x)

def test_sort_on_two_limit_50(self):
catalog = self._make_one(cls=Dummy2)
upper = self.upper
a = catalog(sort_on=('att1', 'num'), att1='att1', b_start=0, b_size=50)
self.assertEqual(len(a), 50)
for x in range(50):
self.assertEqual(a[x].num, x)

def test_sort_on_two_reverse(self):
catalog = self._make_one()
upper = self.upper
Expand Down

0 comments on commit 8a9608c

Please sign in to comment.