File tree 1 file changed +4
-6
lines changed
test_opensearchpy/test_server
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -371,10 +371,10 @@ def run_match(self, action: Any) -> None:
371
371
372
372
if (
373
373
isinstance (expected , str )
374
- and expected .startswith ("/" )
375
- and expected .endswith ("/" )
374
+ and expected .strip (). startswith ("/" )
375
+ and expected .strip (). endswith ("/" )
376
376
):
377
- expected = re .compile (expected [1 :- 1 ], re .VERBOSE | re .MULTILINE )
377
+ expected = re .compile (expected . strip () [1 :- 1 ], re .VERBOSE | re .MULTILINE )
378
378
assert expected .search (value ), "%r does not match %r" % (
379
379
value ,
380
380
expected ,
@@ -417,9 +417,7 @@ def _resolve(self, value: Any) -> Any:
417
417
value = value .replace (key_replace , v )
418
418
break
419
419
420
- if isinstance (value , string_types ):
421
- value = value .strip ()
422
- elif isinstance (value , dict ):
420
+ if isinstance (value , dict ):
423
421
value = dict ((k , self ._resolve (v )) for (k , v ) in value .items ())
424
422
elif isinstance (value , list ):
425
423
value = list (map (self ._resolve , value ))
You can’t perform that action at this time.
0 commit comments