Skip to content

Implement page function #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix linter issues
Signed-off-by: wiseaidev <business@wiseai.dev>
  • Loading branch information
wiseaidev committed Aug 10, 2022
commit 09b0bf637f10ceed5bc3607b1485f21a88228848
7 changes: 6 additions & 1 deletion tests/test_hash_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ async def test_pagination_queries(members, m):

assert actual == [member1, member2]

actual = await m.Member.find().page(1,1)
actual = await m.Member.find().page(1, 1)

assert actual == [member2]

actual = await m.Member.find().page(0, 1)

assert actual == [member1]

Expand Down Expand Up @@ -624,3 +628,4 @@ class Address(m.BaseHashModel):
assert (
Address.redisearch_schema()
== f"ON HASH PREFIX 1 {key_prefix} SCHEMA pk TAG SEPARATOR | a_string TAG SEPARATOR | a_full_text_string TAG SEPARATOR | a_full_text_string AS a_full_text_string_fts TEXT an_integer NUMERIC SORTABLE a_float NUMERIC"
)