Coding style

This commit is contained in:
Lamar Pavel 2015-10-21 14:38:08 +02:00
parent 0b78fb65c9
commit 82c608038d

View File

@ -32,7 +32,7 @@ def test_cache_size_leq_max_cache_size(config_stub, tmpdir):
'general': {'private-browsing': False}
}
disk_cache = cache.DiskCache(str(tmpdir))
assert(1024 >= disk_cache.cacheSize())
assert(disk_cache.cacheSize() <= 1024)
def test_cache_deactivated_private_browsing(config_stub, tmpdir):
@ -42,7 +42,7 @@ def test_cache_deactivated_private_browsing(config_stub, tmpdir):
'general': {'private-browsing': True}
}
disk_cache = cache.DiskCache(str(tmpdir))
assert(0 == disk_cache.cacheSize())
assert(disk_cache.cacheSize() == 0)
def test_cache_deactivated_no_cachedir(config_stub):
@ -52,11 +52,11 @@ def test_cache_deactivated_no_cachedir(config_stub):
'general': {'private-browsing': False}
}
disk_cache = cache.DiskCache("")
assert(0 == disk_cache.cacheSize())
assert(disk_cache.cacheSize() == 0)
def test_clear_cache_activated(config_stub, tmpdir):
"""Test if cache empty after clearing it."""
"""Test if cache is empty after clearing it."""
config_stub.data = {
'storage': {'cache-size': 1024},
'general': {'private-browsing': False}