cloudant / python-cloudant

A Python library for Cloudant and CouchDB
Apache License 2.0
163 stars 55 forks source link

test_get_search_result_with_both_q_and_query failure #222

Closed ricellis closed 7 years ago

ricellis commented 7 years ago

The test tests.unit.database_tests.CloudantDatabaseTests.test_get_search_result_with_both_q_and_query failed with this message:

Error Message
"A si[15 chars]rameter is required. Found: {'query': 'julia*', 'q': 'julia*'}" != "A si[15 chars]rameter is required. Found: {'q': 'julia*', 'query': 'julia*'}"
- A single query/q parameter is required. Found: {'query': 'julia*', 'q': 'julia*'}
?                                                   ----
+ A single query/q parameter is required. Found: {'q': 'julia*', 'query': 'julia*'}

The problem is that the test asserts a static message against a generated message wrt the query parameters, so the ordering is not guaranteed. We should either just assert the beginning of the message or make sure the parameters are compared or issued in the same order.

rhyshort commented 7 years ago

This was fixed as part of 5e33426f75c83051192367c552041d100ecc1756