Test offset behaviour

This commit is contained in:
Stefan Wehrmeyer 2014-01-31 21:52:57 +01:00
parent 88da290740
commit 6deba5937e

View File

@ -205,6 +205,12 @@ class TableTestCase(unittest.TestCase):
ds = list(self.tbl.find(place=TEST_CITY_1, _limit=1, _step=2))
assert len(ds) == 1, ds
def test_offset(self):
ds = list(self.tbl.find(place=TEST_CITY_1, _offset=1))
assert len(ds) == 2, ds
ds = list(self.tbl.find(place=TEST_CITY_1, _limit=2, _offset=2))
assert len(ds) == 1, ds
def test_distinct(self):
x = list(self.tbl.distinct('place'))
assert len(x) == 2, x