File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1276,7 +1276,7 @@ def _combine_expressions(self, expressions):
1276
1276
return combined
1277
1277
1278
1278
return expressions [0 ]
1279
-
1279
+
1280
1280
# pylint: disable=too-many-return-statements, too-many-branches
1281
1281
def _build_expression (self , field_name , operator , value ):
1282
1282
target_field = self .proprty_obj (field_name )
Original file line number Diff line number Diff line change @@ -2541,7 +2541,7 @@ def test_count_with_chainable_filter_multiple(service):
2541
2541
2542
2542
responses .add (
2543
2543
responses .GET ,
2544
- f"{ service .url } /Employees/$count?%24filter=ID% 20eq%2023%20and%20NickName% 20eq%20%27Steve%27" ,
2544
+ f"{ service .url } /Employees/$count?%24filter=%28ID% 20eq%2023%29% 20and%20%28NickName% 20eq%20%27Steve%27%29 " ,
2545
2545
json = 3 ,
2546
2546
status = 200 )
2547
2547
@@ -2557,7 +2557,7 @@ def test_count_with_chainable_filter_multiple(service):
2557
2557
def test_chaining_fix (service ):
2558
2558
from pyodata .v2 .service import FilterExpression as Q
2559
2559
2560
- url = f"{ service .url } /Employees?%24filter=startswith% 28NameFirst%2C+%27Steve%27%29+eq+true+and+ID +eq+23+or+ID+eq+25+or+ID+eq+28"
2560
+ url = f"{ service .url } /Employees?%24filter=%28startswith% 28NameFirst%2C+%27Steve%27%29+eq+true%29 +and+%28ID +eq+23+or+ID+eq+25+or+ID+eq+28%29 "
2561
2561
2562
2562
responses .add (
2563
2563
responses .GET ,
@@ -2581,7 +2581,7 @@ def test_count_with_chainable_filter_or(service):
2581
2581
2582
2582
responses .add (
2583
2583
responses .GET ,
2584
- f"{ service .url } /Employees/$count?$filter=%28ID%20eq%2023%20and%20NickName% 20eq%20%27Steve%27%29%20or%20%28ID%20eq%2025%20and%20NickName% 20eq%20%27Tim%27%29" ,
2584
+ f"{ service .url } /Employees/$count?$filter=%28% 28ID%20eq%2023%29% 20and%20%28NickName% 20eq%20%27Steve%27%29%29% 20or%20%28% 28ID%20eq%2025%29% 20and%20%28NickName% 20eq%20%27Tim%27%29 %29" ,
2585
2585
json = 3 ,
2586
2586
status = 200 )
2587
2587
@@ -2600,7 +2600,7 @@ def test_count_with_multiple_chainable_filters_startswith(service):
2600
2600
2601
2601
responses .add (
2602
2602
responses .GET ,
2603
- f"{ service .url } /Employees/$count?$filter=%28ID%20eq%2023%20and%20startswith% 28NickName%2C%20%27Ste%27%29%20eq%20true%29%20or%20%28ID%20eq%2025%20and%20NickName% 20eq%20%27Tim%27%29" ,
2603
+ f"{ service .url } /Employees/$count?$filter=%28% 28ID%20eq%2023%29% 20and%20%28startswith% 28NickName%2C%20%27Ste%27%29%20eq%20true%29%29% 20or%20%28% 28ID%20eq%2025%29% 20and%20%28NickName% 20eq%20%27Tim%27%29 %29" ,
2604
2604
json = 3 ,
2605
2605
status = 200 )
2606
2606
You can’t perform that action at this time.
0 commit comments