Example #1
0
def test_parse_search_response():
    test_input = (
        '<pre>org.apache.lucene.queryParser.ParseException: This is an error</pre>'
    )
    expect = {'error': 'This is an error'}
    assert parse_search_response(test_input) == expect
    assert parse_search_response('{"aaa": "bbb"}') == {'aaa': 'bbb'}
Example #2
0
def test_parse_search_response():
    test_input = '<pre>org.apache.lucene.queryParser.ParseException: This is an error</pre>'
    expect = {'error': 'This is an error'}
    assert parse_search_response(test_input) == expect
    assert parse_search_response('{"aaa": "bbb"}') == {'aaa': 'bbb'}