1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-30 22:34:53 +00:00

Disable cache when testing

This commit is contained in:
zhengxie 2016-01-21 15:35:04 +08:00
parent c4d743b134
commit a8bf96d2e2
2 changed files with 18 additions and 1 deletions

View File

@ -1,4 +1,4 @@
[pytest]
python_files=test_*.py tests.py
addopts = -s -v
DJANGO_SETTINGS_MODULE=seahub.settings
DJANGO_SETTINGS_MODULE=seahub.test_settings

17
seahub/test_settings.py Normal file
View File

@ -0,0 +1,17 @@
from .settings import *
# no cache for testing
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}
# enlarge api throttle
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_RATES': {
'ping': '600/minute',
'anon': '5000/minute',
'user': '300/minute',
},
}