Adding unittests for get_env_variable

This commit is contained in:
Denis-Cosmin Nutiu 2017-04-22 00:23:26 +03:00
parent 425ebf1771
commit 1d879fb78c

View file

@ -39,3 +39,9 @@ class UtilitiesTestCase(unittest.TestCase):
r = ut.to_zero_count(10.52) r = ut.to_zero_count(10.52)
self.assertEqual(9, r) self.assertEqual(9, r)
def test_get_environment_variable(self):
import os
self.assertEqual(ut.get_env_variable("TESTING", "false"), 'false')
os.environ['TESTING'] = 'True'
self.assertEqual(ut.get_env_variable("TESTING", "false"), 'True')