Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Feb 4, 2025
1 parent dbc23b4 commit 6529e49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class TestCheckConstraint:
def test_check_constraint_from_dict__valid(self):
raw = {"name": "chk_raw", "type": "check", "expression": "1 = 1"}
assert CheckConstraint(
name="chk_raw", type=ConstraintType.check, expression="1 = 1"
name="chk_raw", type=ConstraintType.check, expression="(1 = 1)"
) == CheckConstraint.from_dict(raw)

def test_check_constraint_validate__invalid(self):
Expand All @@ -75,8 +75,8 @@ def test_check_constraint_validate__invalid(self):
CheckConstraint.from_dict(raw)

def test_custom_constraint_render(self):
constraint = CheckConstraint(type=ConstraintType.check, expression="1 = 1")
assert constraint.render() == "CHECK (1 = 1)"
constraint = CheckConstraint.from_dict({"type": "check", "expression": "1 = 1"})
assert constraint.render().endswith(" CHECK (1 = 1)")


class TestPrimaryKeyConstraint:
Expand Down

0 comments on commit 6529e49

Please sign in to comment.