gnaponie / greenwave

Forked from greenwave 6 years ago
Clone

4c5f14d Fix caching to be testable.

Authored and Committed by ralph 6 years ago
    Fix caching to be testable.
    
    The old way didn't work because our ``cache`` object was global.  It
    would get configured by the first test and then never be reconfigurable
    for other tests.
    
    This gets fixed here by hanging the cache region on `flask.current_app`
    so that it gets reinstantiated and reconfigured for each test run (and
    each WSGI process).
    
        
file modified
+3 -3
file modified
+13 -3
file modified
+2 -2