'Ensure that request_cached can work with mixed str and Unicode parameters.'

def test_request_cached_mixed_unicode_str_args(self):

    RequestCache.clear_request_cache()
    def dummy_function(arg1, arg2):
        '\n                                                A    dummy    function    that    expects    an    str    and    unicode    arguments.\n                                                '
        assert isinstance(arg1, str), 'First    parameter    has    to    be    of    type    `str`'
        assert isinstance(arg2, unicode), 'Second    parameter    has    to    be    of    type    `unicode`'
        return True
    self.assertTrue(dummy_function('Hello', u'World'), 'Should    be    callable    with    ASCII    chars')
    self.assertTrue(dummy_function('H\xe2\x88\x82ll\xc3\xa5', u'W\xf8rld'), 'Should    be    callable    with    non-ASCII    chars')
    wrapped = request_cached(dummy_function)
    self.assertTrue(wrapped('Hello', u'World'), 'Wrapper    should    handle    ASCII    only    chars')
    self.assertTrue(wrapped('H\xe2\x88\x82ll\xc3\xa5', u'W\xf8rld'), 'Wrapper    should    handle    non-ASCII    chars')
