Test offset behaviour
This commit is contained in:
parent
88da290740
commit
6deba5937e
@ -205,6 +205,12 @@ class TableTestCase(unittest.TestCase):
|
|||||||
ds = list(self.tbl.find(place=TEST_CITY_1, _limit=1, _step=2))
|
ds = list(self.tbl.find(place=TEST_CITY_1, _limit=1, _step=2))
|
||||||
assert len(ds) == 1, ds
|
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):
|
def test_distinct(self):
|
||||||
x = list(self.tbl.distinct('place'))
|
x = list(self.tbl.distinct('place'))
|
||||||
assert len(x) == 2, x
|
assert len(x) == 2, x
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user