From aa62a547d517df4ff68d77f711681099bcaf05a3 Mon Sep 17 00:00:00 2001 From: Lamar Pavel Date: Wed, 21 Oct 2015 14:20:01 +0200 Subject: [PATCH] Use tmpdir fixture instead of "/foo/bar" --- tests/unit/browser/test_cache.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/browser/test_cache.py b/tests/unit/browser/test_cache.py index 4f310c7b4..3049c3df2 100644 --- a/tests/unit/browser/test_cache.py +++ b/tests/unit/browser/test_cache.py @@ -25,23 +25,23 @@ from qutebrowser.browser import cache from qutebrowser.utils import objreg -def test_cache_size_leq_max_cache_size(config_stub): +def test_cache_size_leq_max_cache_size(config_stub, tmpdir): """Test cacheSize <= MaximumCacheSize when cache is activated.""" config_stub.data = { 'storage': {'cache-size': 1024}, 'general': {'private-browsing': False} } - disk_cache = cache.DiskCache("/foo/bar") + disk_cache = cache.DiskCache(str(tmpdir)) assert(1024 >= disk_cache.cacheSize()) -def test_cache_deactivated_private_browsing(config_stub): +def test_cache_deactivated_private_browsing(config_stub, tmpdir): """Test if cache is deactivated in private-browsing mode.""" config_stub.data = { 'storage': {'cache-size': 1024}, 'general': {'private-browsing': True} } - disk_cache = cache.DiskCache("/foo/bar") + disk_cache = cache.DiskCache(str(tmpdir)) assert(0 == disk_cache.cacheSize())