match_expected: add comparator str_len/string_length

This commit is contained in:
debugtalk
2017-06-29 17:32:49 +08:00
parent c9de871485
commit abcba302ae
2 changed files with 5 additions and 0 deletions

View File

@@ -201,3 +201,6 @@ class TestUtils(ApiServerUnittest):
with self.assertRaises(exception.ParamsError):
utils.match_expected(1, 2, "not_supported_comparator")
self.assertTrue(utils.match_expected("2017-06-29 17:29:58", 19, "str_len"))
self.assertTrue(utils.match_expected("2017-06-29 17:29:58", "19", "str_len"))