Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/f/l/Flask-Dogpile-Cache-0.2/tests.py   Flask-Dogpile-Cache(Download)
from copy import deepcopy
from flask import Flask
from flask.ext.dogpile_cache import DogpileCache
 
if sys.version_info < (2, 7):
        self.app = Flask(__name__)
        self.app.debug = True
        self.cache = DogpileCache(self.app, self.config)
 
        self.func_cached_for_hour_value = 12345
    def test_working_outside_of_application_context(self):
        cache = DogpileCache()
        self.assertRaises(RuntimeError, cache.get_region, 'x')
        self.assertRaises(RuntimeError, cache.get_all_regions)
        self.assertRaises(RuntimeError, cache.get_region_decorator, 'x')