Skip to content

Commit 2793895

Browse files
committed
Slowly getting there
1 parent e15faf8 commit 2793895

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/expressions/test_expressions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,9 @@ def test_in() -> None:
923923
def test_not_in() -> None:
924924
ref = Reference("a")
925925
not_in = NotIn(ref, ["a", "b", "c"])
926-
json_repr = '{"term":"a","type":"not-in","items":["a","b","c"]}'
927-
assert not_in.model_dump_json() == json_repr
926+
json_repr = not_in.model_dump_json()
927+
assert not_in.model_dump_json().startswith('{"term":"a","type":"not-in","values":')
928+
assert BooleanExpression.model_validate_json(json_repr) == not_in
928929
assert str(not_in) == f"NotIn({str(ref)}, {{a, b, c}})"
929930
assert repr(not_in) == f"NotIn({repr(ref)}, {{literal('a'), literal('b'), literal('c')}})"
930931
assert not_in == eval(repr(not_in))

0 commit comments

Comments
 (0)