Skip to content

Commit a1331fc

Browse files
committed
refactor: TT-185 add more scenarios to test__build_where_should_return_concatenated_conditions
1 parent 06cbca7 commit a1331fc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/utils/query_builder_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,19 @@ def test__build_select_return_fields_in_select_list(
139139

140140

141141
@pytest.mark.parametrize(
142-
"where_dict,expected_condition",
142+
"fields,expected_condition",
143143
[
144+
(None, ""),
145+
({}, ""),
144146
({"id": 1}, "WHERE c.id = @id"),
145147
({"id": 1, "name": "test"}, "WHERE c.id = @id AND c.name = @name"),
146148
],
147149
)
148-
def test__build_where_should_return_concatenate_conditions(
149-
where_dict, expected_condition,
150+
def test__build_where_should_return_concatenated_conditions(
151+
fields, expected_condition,
150152
):
151153
query_builder = CosmosDBQueryBuilder().add_sql_where_equal_condition(
152-
where_dict
154+
fields
153155
)
154156

155157
result = query_builder._CosmosDBQueryBuilder__build_where()

0 commit comments

Comments
 (0)