From c8e8ecc0d2d8d6b5f22abb8641cfdf1b4746d210 Mon Sep 17 00:00:00 2001 From: Abrar Mesbah Date: Fri, 29 Jul 2022 09:15:30 -0400 Subject: [PATCH] run black --- tests/test_conditions.py | 75 ++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 45 deletions(-) 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():