mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 20:37:35 +08:00
bugfix: match_expected should raise ParamsError when comparator is not supported
This commit is contained in:
@@ -197,4 +197,7 @@ class TestUtils(ApiServerUnittest):
|
||||
self.assertTrue(utils.match_expected("3ab", "123abc456", "contained_by"))
|
||||
|
||||
self.assertTrue(utils.match_expected("123abc456", "^123.*456$", "regex"))
|
||||
self.assertFalse(utils.match_expected("123abc456", "^12b.*456$", "regex"))
|
||||
self.assertFalse(utils.match_expected("123abc456", "^12b.*456$", "regex"))
|
||||
|
||||
with self.assertRaises(exception.ParamsError):
|
||||
utils.match_expected(1, 2, "not_supported_comparator")
|
||||
|
||||
Reference in New Issue
Block a user