#NEWLINE# def get_elasticsearch_backend( self ) : #NEWLINE# #INDENT# from django.conf import settings #NEWLINE# from wagtail.wagtailsearch.backends import get_search_backend #NEWLINE# backend_path = 'wagtail.wagtailsearch.backends.elasticsearch' #NEWLINE# for ( backend_name , backend_conf ) in settings . WAGTAILSEARCH_BACKENDS . items ( ) : #NEWLINE# #INDENT# if ( backend_conf [ 'BACKEND' ] == backend_path ) : #NEWLINE# #INDENT# return get_search_backend ( self ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise unittest . SkipTest ( ( 'No WAGTAILSEARCH_BACKENDS entry for the backend %s' % backend_path ) )