def test_cache_config_change_cache_size(config_stub, tmpdir):
 max_cache_size = 1024
 config_stub.data = {'storage': {'cache-size': max_cache_size}, 'general': {'private-browsing': False}}
 disk_cache = cache.DiskCache(str(tmpdir))
 assert (disk_cache.maximumCacheSize() == max_cache_size)
 config_stub.set('storage', 'cache-size', (max_cache_size * 2))
 assert (disk_cache.maximumCacheSize() == (max_cache_size * 2))

def test_cache_config_change_cache_size ( config_stub , tmpdir ) : max_cache_size = 1024 config_stub . data = { 'storage' : { 'cache-size' : max_cache_size } , 'general' : { 'private-browsing' : False } } disk_cache = cache . DiskCache ( str ( tmpdir ) ) assert ( disk_cache . maximumCacheSize ( ) == max_cache_size ) config_stub . set ( 'storage' , 'cache-size' , ( max_cache_size * 2 ) ) assert ( disk_cache . maximumCacheSize ( ) == ( max_cache_size * 2 ) )
change cache size and emit signal to trigger on_config_changed .