Ejemplo n.º 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
Ejemplo n.º 2
0
 def __init__(self, args):
     super(DeployCommand, self).__init__(args)
     self.config = config_helpers.load_config()
     build_helpers.verify_build(self.args)
Ejemplo n.º 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 []
Ejemplo n.º 4
0
 def __init__(self, args):
     super(SyncCommand, self).__init__(args)
     self.config = config_helpers.load_config()
Ejemplo n.º 5
0
 def __init__(self, args):
     super(UpdateTemplateCommand, self).__init__(args)
     self.config = config_helpers.load_config()
     self.template_repo = self.args["--template-repo"]
Ejemplo n.º 6
0
def test_load_config(json_mock, open_mock, isfile_mock):
    json_mock.load.return_value = {'foo': 'bar'}
    assert load_config() == {'foo': 'bar'}