Add file caching tests

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-07-26 15:49:07 -04:00
parent c05dcf5b05
commit 1c7ceca432
8 changed files with 230 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
from __future__ import unicode_literals
from mayan.apps.common.tests import BaseTestCase
from .mixins import CacheTestMixin
class CacheModelTestCase(CacheTestMixin, BaseTestCase):
def test_cache_purge(self):
self._create_test_cache()
self._create_test_cache_partition()
self._create_test_cache_partition_file()
cache_total_size = self.test_cache.get_total_size()
self.test_cache.purge()
self.assertNotEqual(cache_total_size, self.test_cache.get_total_size())