At present, result documents returned from Solr aren't run through the constructor as passed to a query's execute(constructor=...) method -- thus all MLT results are always plain dicts. This resolves this issue and comes with tests.
This pull request also features a bunch of test fixes to Sunburnt:
Also, the tests related to dates within Sunburnt are failing. I would make an attempt at fixing them, but I'm unsure about how Sunburnt is expecting date/times to be stored with/without timezone information. Presumably, the dates should be stored with TZ information (if pytz is available) to clarify they are UTC, but some of the tests appear to (implicitly) test that TZ information is discarded.
Thanks, these all look like good fixes, especially adding the test for MLT.
There's a couple of comments on the first patch, but if those are answered, this looks good.
Fixing tests to run; ensuring search tests load by reducing duplicate…
Ensure highlights constructor is tested
Ensure 'more like this' results are transformed using a query's exect…
The comment was moved above (see line 147). The reason the result was changed is that an a query is for the Boolean value 'false', so the result should be false also (not 'true' as it was) -- this test was failing.
I also added more Boolean value testing as well (now 3 tests for false and 3 for true), hence the moving of the comment. Change this as you'd like, though.
@tow Should be good to go now. Thanks for the comments; some inadvertent leftovers from earlier. As for the test result change as mentioned above, hopefully that explains it.