toastdriven/pysolr — pull request #69 by zyegfryed (2013-02-06 15:45:11+00:00)
Title: Added MoreLikeThis handler to solrconfig.xml test cores.

The MoreLikeThis handler is missing in solrconfig.xml by default leading to 2 broken tests. Here's the stacktrace:

$ python -m unittest2 tests
...............E............E........
====================================================================
ERROR: test__mlt (tests.client.SolrTestCase)
--------------------------------------------------------------------
Traceback (most recent call last):
File "tests/client.py", line 205, in test__mlt
resp_body = self.solr._mlt({'q': 'id:doc_1', 'mlt.fl': 'title'})
File "pysolr.py", line 317, in _mlt
return self._send_request('get', path)
File "pysolr.py", line 292, in _send_request
raise SolrError(error_message)
SolrError: [Reason: Error 404 Not Found]

====================================================================
ERROR: test_more_like_this (tests.client.SolrTestCase)
--------------------------------------------------------------------
Traceback (most recent call last):
File "tests/client.py", line 320, in test_more_like_this
results = self.solr.more_like_this('id:doc_1', 'text')
File "pysolr.py", line 620, in more_like_this
response = self._mlt(params)
File "pysolr.py", line 317, in _mlt
return self._send_request('get', path)
File "pysolr.py", line 292, in _send_request
raise SolrError(error_message)
SolrError: [Reason: Error 404 Not Found]

--------------------------------------------------------------------
Ran 37 tests in 5.422s

FAILED (errors=2)