def test_cache_remove_data(config_stub, tmpdir):
 config_stub.data = {'storage': {'cache-size': 1024}, 'general': {'private-browsing': False}}
 url = 'http://qutebrowser.org'
 disk_cache = cache.DiskCache(str(tmpdir))
 preload_cache(disk_cache, url)
 assert (disk_cache.cacheSize() > 0)
 assert disk_cache.remove(QUrl(url))
 assert (disk_cache.cacheSize() == 0)

def test_cache_remove_data ( config_stub , tmpdir ) : config_stub . data = { 'storage' : { 'cache-size' : 1024 } , 'general' : { 'private-browsing' : False } } url = 'http://qutebrowser.org' disk_cache = cache . DiskCache ( str ( tmpdir ) ) preload_cache ( disk_cache , url ) assert ( disk_cache . cacheSize ( ) > 0 ) assert disk_cache . remove ( QUrl ( url ) ) assert ( disk_cache . cacheSize ( ) == 0 )
test if a previously inserted entry can be removed from the cache .