def test_cache_deactivated_update_metadata(config_stub, tmpdir):
 config_stub.data = {'storage': {'cache-size': 1024}, 'general': {'private-browsing': True}}
 url = 'http://qutebrowser.org'
 disk_cache = cache.DiskCache(str(tmpdir))
 metadata = QNetworkCacheMetaData()
 metadata.setUrl(QUrl(url))
 assert metadata.isValid()
 assert (disk_cache.updateMetaData(metadata) is None)

def test_cache_deactivated_update_metadata ( config_stub , tmpdir ) : config_stub . data = { 'storage' : { 'cache-size' : 1024 } , 'general' : { 'private-browsing' : True } } url = 'http://qutebrowser.org' disk_cache = cache . DiskCache ( str ( tmpdir ) ) metadata = QNetworkCacheMetaData ( ) metadata . setUrl ( QUrl ( url ) ) assert metadata . isValid ( ) assert ( disk_cache . updateMetaData ( metadata ) is None )
test updating the meta data when cache is not activated .