Closed tisto closed 1 year ago
There is a failing test:
Error in test testSimpleSearch (collective.solr.tests.test_query.SearchTests)
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/unittest/case.py", line 591, in run
self._callTestMethod(testMethod)
File "/opt/hostedtoolcache/Python/3.10.10/x64/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
method()
File "/home/runner/work/collective.solr/collective.solr/src/collective/solr/tests/test_query.py", line 415, in testSimpleSearch
results = self.search(query, rows="10", wt="xml", indent="on").results()
/home/runner/work/collective.solr/collective.solr/src/collective/solr/tests/test_solr.py:31: DeprecationWarning: Please use assertEqual instead.
self.failUnlessEqual(str(output), add_request.decode("utf-8"))
File "/home/runner/work/collective.solr/collective.solr/src/collective/solr/search.py", line 114, in search
if "rows" in parameters and parameters["rows"] > 1000000000:
TypeError: '>' not supported between instances of 'str' and 'int'
I'm doing a bit more work on this, standardizing how the max rows are set in several different places in the codebase.
@tisto I'd like your feedback since I changed a few more things than you were originally working on.
@davisagli thank you! LGTM! I was too lazy to look into standardizing stuff. :)
…er exceeds a certain value. This fixes #357