Skip to content

Commit

Permalink
Merge pull request #140 from openedx/ashultz0/revert-rename
Browse files Browse the repository at this point in the history
fix: cannot rename perform-search to clearer name, breaks tests
  • Loading branch information
ashultz0 authored Nov 16, 2023
2 parents 93939ba + 97ddab0 commit 4b01497
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
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

0 comments on commit 4b01497

Please sign in to comment.