mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-18 09:37:37 +08:00
bugfix #31: comparator endswith
This commit is contained in:
@@ -204,7 +204,7 @@ def match_expected(value, expected, comparator="eq", check_item=""):
|
||||
elif comparator in ["startswith"]:
|
||||
assert str(value).startswith(str(expected))
|
||||
elif comparator in ["endswith"]:
|
||||
assert str(expected).startswith(str(value))
|
||||
assert str(value).endswith(str(expected))
|
||||
else:
|
||||
raise exception.ParamsError("comparator not supported!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user