[tests] enforce default caching policy

When ran in a chroot in environment where entropy.tools.total_memory()
would return 0, the test failed.
This commit is contained in:
Sławomir Nizio
2016-04-14 22:37:10 +02:00
parent 1e23d2cecb
commit d9843c2d1d

View File

@@ -9,7 +9,8 @@ from entropy.server.interfaces import Server
from entropy.const import etpConst, initconfig_entropy_constants, etpSys
from entropy.core.settings.base import SystemSettings
from entropy.db import EntropyRepository
from entropy.db.cache import EntropyRepositoryCacher
from entropy.db.cache import EntropyRepositoryCacher, \
EntropyRepositoryCachePolicies
from entropy.exceptions import RepositoryError
import entropy.tools
import tests._misc as _misc
@@ -28,6 +29,11 @@ class EntropyRepositoryTest(unittest.TestCase):
read_only = False, lock_remote = False, is_new = True)
foo_db.initializeRepository()
# force cache policy to avoid system dependent behaviour (memory size
# detection)
EntropyRepositoryCachePolicies.DEFAULT_CACHE_POLICY = \
EntropyRepositoryCachePolicies.ALL
def tearDown(self):
"""