Add test for the setting environment support.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-06-20 01:35:12 -04:00
parent a105fe46a5
commit ea636aac7e
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from __future__ import absolute_import, unicode_literals
import os
from common.settings import setting_paginate_by
from common.tests import BaseTestCase
from .literals import ENVIRONMENT_TEST_NAME, ENVIRONMENT_TEST_VALUE
class ClassesTestCase(BaseTestCase):
def test_environment_variable(self):
os.environ[
'MAYAN_{}'.format(ENVIRONMENT_TEST_NAME)
] = ENVIRONMENT_TEST_VALUE
self.assertTrue(setting_paginate_by.value, ENVIRONMENT_TEST_VALUE)