def METHOD_NAME(tree, expected, monkeypatch):
    # Shouldn't try and fit a full spec in here, this test is large enough as it is - we skip ResolvingParser instead
    class MockResolvingParser:
        def __init__(self, spec_string, **kwargs):
            self.specification = {
                "components": {
                    "schemas": {"FlowmachineQuerySchema": ast.literal_eval(spec_string)}
                }
            }
    # It looks like we can't mock out ResolvingParser, so we mock out it's parent instead
    monkeypatch.setattr(prance, "BaseParser", MockResolvingParser)
    class MockFlowApiLogger:
        @staticmethod
        def warning(msg):
            print(msg)
    class MockCurrentApp:
        flowapi_logger = MockFlowApiLogger()
    monkeypatch.setattr(quart, "current_app", MockCurrentApp)
    assert schema_to_scopes(tree) == expected