def METHOD_NAME(monkeypatch):
    '''This tests that we get an error message if the config object
    is not loaded when creating an LFRicConst instance. '''
    monkeypatch.setattr(Config, "_HAS_CONFIG_BEEN_INITIALISED", False)
    monkeypatch.setattr(LFRicConstants, "HAS_BEEN_INITIALISED", False)
    with pytest.raises(InternalError) as err:
        LFRicConstants()
    assert ("LFRicConstants is being created before the config file is loaded"
            in str(err.value))
    # If the psyclone command is executed, the flag should be set. The
    # parameters specified here will immediately abort, but still the
    # flag must be set at the end, since the command has to set this flag:
    with pytest.raises(SystemExit) as err:
        generator.main(["some_file.f90"])
    assert Config.has_config_been_initialised() is True