Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openfun/richie
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 820b1cc15384741757082d3b23441db24b3c4dd9
Choose a base ref
..
head repository: openfun/richie
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d896920d05534333cb19fe998fad3fe9030a0e44
Choose a head ref
Showing with 8 additions and 1 deletion.
  1. +3 −0 src/richie/apps/search/__init__.py
  2. +5 −1 tests/apps/search/test_index_client.py
3 changes: 3 additions & 0 deletions src/richie/apps/search/__init__.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,9 @@


def new_elasticsearch_client():
"""
Utility function to allow to test the `RICHIE_ES_CLIENT_KWARGS` setting.
"""
return ElasticsearchClientCompat7to6(
getattr(settings, "RICHIE_ES_HOST", ["elasticsearch"]),
**getattr(settings, "RICHIE_ES_CLIENT_KWARGS", {}),
6 changes: 5 additions & 1 deletion tests/apps/search/test_index_client.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
"""
Test the index client initialization.
"""
from django.test import TestCase
from django.test.utils import override_settings

from richie.apps.search import new_elasticsearch_client


class IndexClientTestCase(TestCase):
"""
Test the index client extra vars
Test the index client.
"""

@override_settings(RICHIE_ES_CLIENT_KWARGS={"timeout": 99})