Ejemplo n.º 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))
         ])
     )
Ejemplo n.º 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'])
Ejemplo n.º 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))
     ]))