Example #1
0
 def test_parse_environment_as_dict(self):
     environment = {
         'NORMAL': 'F1',
         'CONTAINS_EQUALS': 'F=2',
         'TRAILING_EQUALS': None,
     }
     self.assertEqual(config.parse_environment(environment), environment)
Example #2
0
 def test_parse_environment_as_dict(self):
     environment = {
         'NORMAL': 'F1',
         'CONTAINS_EQUALS': 'F=2',
         'TRAILING_EQUALS': None,
     }
     self.assertEqual(config.parse_environment(environment), environment)
Example #3
0
 def test_parse_environment_as_list(self):
     environment = [
         'NORMAL=F1',
         'CONTAINS_EQUALS=F=2',
         'TRAILING_EQUALS=',
     ]
     self.assertEqual(
         config.parse_environment(environment),
         {'NORMAL': 'F1', 'CONTAINS_EQUALS': 'F=2', 'TRAILING_EQUALS': ''},
     )
Example #4
0
 def test_parse_environment_as_list(self):
     environment = [
         'NORMAL=F1',
         'CONTAINS_EQUALS=F=2',
         'TRAILING_EQUALS=',
     ]
     self.assertEqual(
         config.parse_environment(environment),
         {'NORMAL': 'F1', 'CONTAINS_EQUALS': 'F=2', 'TRAILING_EQUALS': ''},
     )
Example #5
0
 def test_parse_environment_empty(self):
     self.assertEqual(config.parse_environment(None), {})
Example #6
0
 def test_parse_environment_invalid(self):
     with self.assertRaises(ConfigurationError):
         config.parse_environment('a=b')
Example #7
0
 def test_parse_environment_empty(self):
     self.assertEqual(config.parse_environment(None), {})
Example #8
0
 def test_parse_environment_invalid(self):
     with self.assertRaises(ConfigurationError):
         config.parse_environment('a=b')
Example #9
0
 def test_parse_environment_as_dict(self):
     environment = {"NORMAL": "F1", "CONTAINS_EQUALS": "F=2", "TRAILING_EQUALS": None}
     self.assertEqual(config.parse_environment(environment), environment)
Example #10
0
 def test_parse_environment_as_list(self):
     environment = ["NORMAL=F1", "CONTAINS_EQUALS=F=2", "TRAILING_EQUALS="]
     self.assertEqual(
         config.parse_environment(environment), {"NORMAL": "F1", "CONTAINS_EQUALS": "F=2", "TRAILING_EQUALS": ""}
     )