Commit Graph

15 Commits

Author SHA1 Message Date
Tim Gates 1ad7ac9781 docs: Fix a few typos
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>
2022-10-07 16:55:40 +02:00
Shybert 9a8933c87b `url` -> `re_path`
Required for Django 4 compat
2022-10-07 16:55:40 +02:00
Cristopher Hernandez 1688cfdaf8 Tweak comments 2022-10-07 16:55:40 +02:00
Cristopher Hernandez 21a8a498b3 Add cleanup for deleted object entries in buildwatson 2022-10-07 16:55:40 +02:00
Benedikt Willi f547a69e9f Added possibility to run tests through Github Actions. 2022-10-07 16:55:40 +02:00
Henrik Hørlück Berg a0d116d0d8 Change deprecated force_text -> force_str 2022-10-07 16:55:40 +02:00
Ivan Elfimov ec7db58b15 remove python_2_unicode_compatible from tests 2022-10-07 16:55:40 +02:00
Krukas 75980f8406 [BUGFIX] #255 Fixed MySQL tests failing mysql + admin context
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
2022-10-07 16:55:40 +02:00
Matt Molyneaux 6d9d03b5c0 Tests to demonstrate the bug 2018-04-30 23:28:59 +01:00
Dave Hall ac90ba92b8 Trying to lose tox. It's been a right pain. 2017-12-21 16:08:28 +00:00
Dave Hall d6084f7a90 Fixing filter() with a UUID field. Closes #227. 2017-12-06 16:51:57 +00:00
Dave Hall 2226de139b Fixing flake8 2017-11-27 08:54:17 +00:00
Dave Hall 7b35ba0c76 Fixing escaping of <> characters in postgres. Closes #219 2017-09-27 10:24:45 +01:00
Matt Molyneaux 5ac7bba7ba Add missing context processor to test app 2017-06-13 12:30:22 +01:00
Rustem Sayargaliev fb1a3991f1 Added flake8, fixed syntax, flattened package structure 2016-11-07 21:33:33 +01:00