Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cannot rename perform-search to clearer name, breaks tests #140

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edxsearch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" Container module for testing / demoing search """

__version__ = '3.7.0'
__version__ = '3.7.1'
2 changes: 1 addition & 1 deletion search/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class NoSearchEngineError(Exception):
"""


def perform_course_search(
def perform_search(
search_term,
user=None,
size=10,
Expand Down
4 changes: 2 additions & 2 deletions search/tests/test_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from django.test.utils import override_settings
from elasticsearch import exceptions
from elasticsearch.helpers import BulkIndexError
from search.api import NoSearchEngineError, perform_course_search
from search.api import NoSearchEngineError, perform_search
from search.elastic import RESERVED_CHARACTERS
from search.tests.mock_search_engine import (MockSearchEngine,
json_date_to_datetime)
Expand Down Expand Up @@ -238,7 +238,7 @@ class TestNone(TestCase):
def test_perform_search(self):
""" search opertaion should yeild an exception with no search engine """
with self.assertRaises(NoSearchEngineError):
perform_course_search("abc test")
perform_search("abc test")


@override_settings(SEARCH_ENGINE="search.elastic.ElasticSearchEngine")
Expand Down
4 changes: 2 additions & 2 deletions search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django.views.decorators.http import require_POST

from eventtracking import tracker as track
from .api import perform_course_search, course_discovery_search, course_discovery_filter_fields
from .api import perform_search, course_discovery_search, course_discovery_filter_fields
from .initializer import SearchInitializer

# log appears to be standard name used for logger
Expand Down Expand Up @@ -96,7 +96,7 @@ def do_search(request, course_id=None):
}
)

results = perform_course_search(
results = perform_search(
search_term,
user=request.user,
size=size,
Expand Down
Loading