There are small typos in:
- tests/test_watson/tests.py
- watson/search.py
Fixes:
- Should read `request` rather than `requet`.
- Should read `committed` rather than `commited`.
Signed-off-by: Tim Gates <tim.gates@iress.com>
The admin tests failed because of the following error:
(admin.E404) 'django.contrib.messages.context_processors.messages' must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin application.
This is fixed by adding
'django.contrib.messages.context_processors.messages' tot the context_processors
The MySQL tests failed on the error:
django.db.utils.OperationalError: (1055, "Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test_test_project.watson_searchentry.title' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by")
After some diging this hapens because the qeuryset count uses an annotation/aggrogation.
37f8f29377/django/db/models/sql/query.py (L510)
Based on what django recomends for setting the sql_mode to https://docs.djangoproject.com/en/2.2/ref/databases/#setting-sql-mode.
And the recomandation from
https://code.djangoproject.com/ticket/15940#comment:10 to always explicitly set the sql_mode.
I have updated the test MySQL settings to set the sql_mode to STRICT_TRANS_TABLES