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