diff --git a/tests/test_conditions.py b/tests/test_conditions.py index d650630..397051c 100644 --- a/tests/test_conditions.py +++ b/tests/test_conditions.py @@ -11,51 +11,36 @@ def test_condition(): """Test condition generation.""" - assert ( - build_conditions( - **{ - "a": 5, - } - ) - == ("a == ?", (5,)) - ) - assert ( - build_conditions( - **{ - "a": 5, - "b": 4, - } - ) - == ("(a == ?) AND (b == ?)", (5, 4)) - ) - assert ( - build_conditions( - **{ - "$or": [ - {"a": 5}, - {"b": 4}, - ], - "c": 3, - } - ) - == ("((a == ?) OR (b == ?)) AND (c == ?)", (5, 4, 3)) - ) - assert ( - build_conditions( - **{ - "a": {"$ge": 5}, - } - ) - == ("a >= ?", (5,)) - ) - assert ( - build_conditions( - **{ - "a": {"$in": [1, 2]}, - } - ) - == ("a in (?, ?)", (1, 2)) - ) + assert build_conditions( + **{ + "a": 5, + } + ) == ("a == ?", (5,)) + assert build_conditions( + **{ + "a": 5, + "b": 4, + } + ) == ("(a == ?) AND (b == ?)", (5, 4)) + assert build_conditions( + **{ + "$or": [ + {"a": 5}, + {"b": 4}, + ], + "c": 3, + } + ) == ("((a == ?) OR (b == ?)) AND (c == ?)", (5, 4, 3)) + assert build_conditions( + **{ + "a": {"$ge": 5}, + } + ) == ("a >= ?", (5,)) + assert build_conditions( + **{ + "a": {"$in": [1, 2]}, + } + ) == ("a in (?, ?)", (1, 2)) def test_malformed_conditions():