def test_decorator_for_cache_key_positional_args(self):
        """ caching a key built from positional arguments and returning from cache
        """

        @supycache.supycache(cache_key='{0}')
        def simple_function(x, y):
            return '%d:cached_value' % y

        simple_function('key', 1)
        self.assertTrue(self.backend.get('key') == '1:cached_value')

        simple_function('key', 2)
        self.assertTrue(self.backend.get('key') == '1:cached_value')

        simple_function('new_key', 3)
        self.assertTrue(self.backend.get('new_key') == '3:cached_value')
dataset/ETHPy150Open lonetwin/supycache/tests/test_supycache.py/TestCacheDecorators.test_decorator_for_cache_key_positional_args/original