Skip to content

Commit bec8207

Browse files
committed
add tests for eq and ne
1 parent 6ab95ab commit bec8207

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/columns/test_boolean.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,22 @@ def test_return_type(self):
3131
.run_sync()["boolean"],
3232
expected,
3333
)
34+
35+
def test_eq_and_ne(self):
36+
"""
37+
Make sure the `eq` and `ne` methods works correctly.
38+
"""
39+
MyTable.insert(
40+
MyTable(boolean=True),
41+
MyTable(boolean=False),
42+
MyTable(boolean=True),
43+
).run_sync()
44+
45+
self.assertEqual(
46+
MyTable.count().where(MyTable.boolean.eq(True)).run_sync(), 2
47+
)
48+
49+
self.assertEqual(
50+
MyTable.count().where(MyTable.boolean.ne(True)).run_sync(), 1
51+
)
52+

0 commit comments

Comments
 (0)