forked from randsleadershipslack/destalinator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request randsleadershipslack#169 from TheConnMan/array-env…
…-vars Filter out empty list items from array environment variables
- Loading branch information
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os | ||
import unittest | ||
|
||
from config import get_config | ||
|
||
|
||
class ConfigTest(unittest.TestCase): | ||
def setUp(self): | ||
os.environ['DESTALINATOR_STRING_VARIABLE'] = 'test' | ||
os.environ['DESTALINATOR_LIST_VARIABLE'] = 'test,' | ||
|
||
def test_environment_variable_configs(self): | ||
self.assertEqual(get_config().string_variable, 'test') | ||
self.assertListEqual(get_config().list_variable, ['test']) |