diff --git a/python/tests/match_object_test.py b/python/tests/match_object_test.py index b3a604d56..a49292e4a 100644 --- a/python/tests/match_object_test.py +++ b/python/tests/match_object_test.py @@ -205,6 +205,7 @@ def test_get_value_string(): c = StringDictionaryCompiler({"memory_limit_mb": "10"}) c.add("abc", "aaaaa") c.add("abd", "bbbbb") + c.add("abe", "{}") with tmp_dictionary(c, "match_object_string.kv") as d: m = d["abc"] assert m.value == "aaaaa" @@ -221,6 +222,10 @@ def test_get_value_string(): ) == "bbbbb" ) + m = d["abe"] + # gh#333: keyvi < 0.6.4 returned a dictionary instead of a string + assert m.value == "{}" + assert isinstance(m.value, str) def test_matched_string():