Add test for metaData() with cache deactivated
This commit is contained in:
parent
404da750c6
commit
b94f7c7681
@ -213,6 +213,18 @@ def test_cache_metadata(config_stub, tmpdir):
|
||||
assert disk_cache.metaData(QUrl(url)) == metadata
|
||||
|
||||
|
||||
def test_cache_deactivated_metadata(config_stub, tmpdir):
|
||||
"""Test querying metaData() on not activated cache."""
|
||||
config_stub.data = {
|
||||
'storage': {'cache-size': 1024},
|
||||
'general': {'private-browsing': True}
|
||||
}
|
||||
url = 'http://qutebrowser.org'
|
||||
|
||||
disk_cache = cache.DiskCache(str(tmpdir))
|
||||
assert disk_cache.metaData(QUrl(url)) == QNetworkCacheMetaData()
|
||||
|
||||
|
||||
def test_cache_update_metadata(config_stub, tmpdir):
|
||||
"""Test updating the meta data for an existing cache entry."""
|
||||
config_stub.data = {
|
||||
|
Loading…
Reference in New Issue
Block a user