Add file caching tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
18
mayan/apps/file_caching/tests/test_models.py
Normal file
18
mayan/apps/file_caching/tests/test_models.py
Normal 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())
|
||||
Reference in New Issue
Block a user