示例#1
0
def test_needs_init_command_bad_init():
    with catch_stdout() as output:
        with pytest.raises(SystemExit) as bad_init:
            load_config()
            assert output.getvalue() == "This command requires you to" \
                " be in an `mlt init` built directory"
            assert bad_init.value.code == 1
示例#2
0
文件: deploy.py 项目: dmsuehir/mlt
 def __init__(self, args):
     super(DeployCommand, self).__init__(args)
     self.config = config_helpers.load_config()
     build_helpers.verify_build(self.args)
示例#3
0
 def __init__(self, args):
     super(TemplateConfigCommand, self).__init__(args)
     self.config = config_helpers.load_config()
     self.param_keys = args.get('<name>').split('.') \
         if args.get('<name>') else []
示例#4
0
 def __init__(self, args):
     super(SyncCommand, self).__init__(args)
     self.config = config_helpers.load_config()
示例#5
0
 def __init__(self, args):
     super(UpdateTemplateCommand, self).__init__(args)
     self.config = config_helpers.load_config()
     self.template_repo = self.args["--template-repo"]
示例#6
0
def test_load_config(json_mock, open_mock, isfile_mock):
    json_mock.load.return_value = {'foo': 'bar'}
    assert load_config() == {'foo': 'bar'}