Пример #1
0
 def _get_config(self, name):
     return load_config(
         create_parser().parse_args([
             '-f',
             os.path.join(os.path.dirname(__file__),
                          'yaml/{}.yaml'.format(name))
         ])
     )
Пример #2
0
    def test_yaml_parsing_test1(self):
        os.environ['BAR'] = 'bar'

        config = load_config(
            create_parser().parse_args([
                '-f',
                os.path.join(os.path.dirname(__file__),'yaml/test_env.yaml')
            ])
        )

        # Make sure the env variables are working
        self.assertEqual('bar', config['foo'])
Пример #3
0
 def _get_config(self, name):
     return load_config(create_parser().parse_args([
         '-f',
         os.path.join(os.path.dirname(__file__),
                      'yaml/{}.yaml'.format(name))
     ]))