Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: mise en cache en environnement de developpement (#862)
## 🐗 problème rencontré ### CI 🦺 `DatabaseCache` => tests ok ### pytest local : 🦺 `DatabaseCache` => tests KO 🧧 ``` FAILED lacommunaute/forum/tests/tests_views.py::ForumViewTest::test_filtered_queryset_on_tag - AssertionError: 32 != 20 : 32 queries executed, 20 expected FAILED lacommunaute/forum/tests/tests_views.py::TestDocumentationCategoryForumContent::test_numqueries_on_tags - Failed: Expected to perform 19 queries but 31 were done (add -v option to show queries) FAILED lacommunaute/forum_conversation/tests/tests_views.py::TopicViewTest::test_numqueries - AssertionError: 51 != 39 : 51 queries executed, 39 expected FAILED lacommunaute/stats/tests/tests_views.py::TestForumStatView::test_num_queries - Failed: Expected to perform 7 queries but 19 were done (add -v option to show queries) FAILED lacommunaute/forum/tests/tests_views.py::ForumViewTest::test_queries - AssertionError: 34 != 22 : 34 queries executed, 22 expected FAILED lacommunaute/forum_upvote/tests/test_upvotelistview.py::test_numqueries - Failed: Expected to perform 37 queries but 49 were done (add -v option to show queries) FAILED lacommunaute/pages/tests/test_homepage.py::test_numqueries - Failed: Expected to perform 10 queries but 22 were done (add -v option to show queries) ``` 🦺 `DummyCache` ou `LocMemCache` => tests OK 🍏 🦺 avec les settings de `config.settings.base` + `COMPRESS_OFFLINE=False` => tests KO 🧧 ## 🦄 solution * forcer la compression avant l'execution des tests pour eviter les écritures en DB surnuméraires * harmoniser les settings utilisés par pytest en local et dans la CI ## Type de changement 🪲 Correction de bug (changement non cassant qui corrige un problème). 🚧 technique --------- Co-authored-by: François Freitag <[email protected]>
- Loading branch information