def METHOD_NAME(client):
    """Test sru documents diagnostics."""
    api_url = url_for('api_sru.documents',
                      version='1.1', operation='searchRetrieve',
                      query='(((')
    res = client.get(api_url)
    assert res.status_code == 200
    xml_dict = get_xml_dict(res)
    assert 'srw:searchRetrieveResponse' in xml_dict
    assert xml_dict['srw:searchRetrieveResponse'][
        'diag:diagnostics']['diag:message'] == 'Malformed Query'