def test_unicode_key_multi(self): decorate, canary = self._multi_keygen_decorator( "mynamespace", to_str=compat.text_type) @decorate def one(a, b): pass gen = canary[0] eq_(gen(compat.u('méil'), compat.u('drôle')), [ compat.ue( 'tests.cache.test_decorator:one|mynamespace|m\xe9il'), compat.ue( 'tests.cache.test_decorator:one|mynamespace|dr\xf4le') ])
def test_unicode_key_kwarg_generator(self): decorate, canary = self._kwarg_keygen_decorator( "mynamespace", to_str=compat.text_type) @decorate def one(a, b): pass gen = canary[0] eq_(gen(compat.u('méil'), compat.u('drôle')), compat.ue("tests.cache.test_decorator:" "one|mynamespace|m\xe9il dr\xf4le"))