Exemple #1
0
 def test_getstr_strip_whitespace(self):
     os.environ['TEST_VALUE_STR'] = '  hello  '
     self.assertEquals(envconfig.str('TEST_VALUE_STR'), 'hello')
Exemple #2
0
 def test_getinvalid(self):
     if 'DOES_NOT_EXIST' in os.environ:
         del os.environ['DOES_NOT_EXIST']
     self.assertRaises(KeyError, lambda: envconfig.str('DOES_NOT_EXIST'))
Exemple #3
0
 def test_getstr(self):
     os.environ['TEST_VALUE_STR'] = 'Hello, World'
     self.assertEquals(envconfig.str('TEST_VALUE_STR'), 'Hello, World')
Exemple #4
0
 def test_getinvalid(self):
     if 'DOES_NOT_EXIST' in os.environ:
         del os.environ['DOES_NOT_EXIST']
     self.assertRaises(KeyError, lambda: envconfig.str('DOES_NOT_EXIST'))
Exemple #5
0
 def test_getstr_strip_whitespace(self):
     os.environ['TEST_VALUE_STR'] = '  hello  '
     self.assertEqual(envconfig.str('TEST_VALUE_STR'), 'hello')
Exemple #6
0
 def test_getstr(self):
     os.environ['TEST_VALUE_STR'] = 'Hello, World'
     self.assertEqual(envconfig.str('TEST_VALUE_STR'), 'Hello, World')
Exemple #7
0
import envconfig

# Deployment specific settings
port = envconfig.int('PORT')
debug = envconfig.bool('DEBUG')
client_key = envconfig.str('CLIENT_KEY')
workers = envconfig.int('WEB_CONCURRENCY')

# Resizer behavior
mode = 'clip'

# Quality
filter = 'antialias'
progressive = True
quality = 'keep'