mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-05 07:49:37 +08:00
bugfix: TypeError in match_expected
This commit is contained in:
@@ -196,6 +196,12 @@ class TestUtils(ApiServerUnittest):
|
||||
self.assertTrue(utils.match_expected("123abc", 12, "startswith"))
|
||||
self.assertTrue(utils.match_expected(12345, 123, "startswith"))
|
||||
|
||||
with self.assertRaises(exception.ValidationError):
|
||||
utils.match_expected(None, 3, "len_eq")
|
||||
|
||||
with self.assertRaises(exception.ValidationError):
|
||||
utils.match_expected("abc", None, "gt")
|
||||
|
||||
def test_deep_update_dict(self):
|
||||
origin_dict = {'a': 1, 'b': {'c': 3, 'd': 4}, 'f': 6}
|
||||
override_dict = {'a': 2, 'b': {'c': 33, 'e': 5}, 'g': 7}
|
||||
|
||||
Reference in New Issue
Block a user