Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Nov 20, 2024
1 parent 6f0acfb commit 4f6ecd9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/table/test_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ def sort_order() -> SortOrder:
)


def test_serialize_sort_order_default() -> None:
assert (
SortOrder(SortField(source_id=19)).model_dump_json()
== '{"order-id":1,"fields":[{"source-id":19,"transform":"identity","direction":"asc","null-order":"nulls-first"}]}'
)


def test_serialize_sort_order_unsorted() -> None:
assert UNSORTED_SORT_ORDER.model_dump_json() == '{"order-id":0,"fields":[]}'

Expand Down

0 comments on commit 4f6ecd9

Please sign in to comment.