Example #1
0
 def test_normalize_arm_key(self):
     valid_config = {
         'test': {
             'description': 'a test group',
             'arm': {
                 'default': {
                     'address': 'localhost'
                 }
             }
         }
     }
     groups_config = EnvironmentGroupPreParser().parse(valid_config)
     test_env = groups_config.get('test')
     self.assertNotIn('arm', test_env)
     self.assertEqual(test_env['arms'],
                      {'default': {
                          'address': 'localhost'
                      }})
Example #2
0
 def test_group_include_name(self):
     valid_config = {'test': {}}
     parsed_config = EnvironmentGroupPreParser().parse(valid_config)
     self.assertIn('test', parsed_config)
     self.assertEqual(parsed_config.get('test').get('name', None), 'test')
Example #3
0
 def test_normalize_alm_key_to_tnco(self):
     valid_config = {'test': {'alm': {'address': 'localhost'}}}
     parsed_config = EnvironmentGroupPreParser().parse(valid_config)
     test_env = parsed_config.get('test')
     self.assertNotIn('lm', test_env)
     self.assertEqual(test_env['tnco'], {'address': 'localhost'})