1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/operations/tests/test_conf.py

13 lines
516 B
Python

from django.test import TestCase
from appsettings.models import AppSettings
from operations import utils
class ConfTestCase(TestCase):
def test_defaults_and_bounds(self):
self.assertEqual((utils.concurrency(), utils.retention_days()), (4, 30))
AppSettings.objects.filter(key="WORKER_CONCURRENCY").update(value="99")
self.assertEqual(utils.concurrency(), 4)
AppSettings.objects.filter(key="WORKER_CONCURRENCY").update(value="8")
self.assertEqual(utils.concurrency(), 8)