Skip to content

Commit

Permalink
Merge pull request #5303 from hypothesis/remove-use-of-es-dsl-default…
Browse files Browse the repository at this point in the history
…-connection

Remove use of using="default" for es connection
  • Loading branch information
robertknight committed Sep 18, 2018
2 parents 0ef9193 + 1820bcf commit 2ee5dc5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/h/search/query_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_it_limits_number_of_annotations(self, Annotation, search):
def test_offset(self, pyramid_request, offset, from_):
limiter = query.Limiter()
search = elasticsearch_dsl.Search(
using="default", index=pyramid_request.es.index
using=pyramid_request.es.conn,
)

params = {"offset": offset}
Expand All @@ -68,7 +68,7 @@ def test_limit_output_within_bounds(self, pyramid_request, text):
"""Given any string input, output should be in the allowed range."""
limiter = query.Limiter()
search = elasticsearch_dsl.Search(
using="default", index=pyramid_request.es.index
using=pyramid_request.es.conn,
)

q = limiter(search, {"limit": text}).to_dict()
Expand All @@ -82,7 +82,7 @@ def test_limit_output_within_bounds_int_input(self, pyramid_request, lim):
"""Given any integer input, output should be in the allowed range."""
limiter = query.Limiter()
search = elasticsearch_dsl.Search(
using="default", index=pyramid_request.es.index
using=pyramid_request.es.conn,
)

q = limiter(search, {"limit": str(lim)}).to_dict()
Expand All @@ -96,7 +96,7 @@ def test_limit_matches_input(self, pyramid_request, lim):
"""Given an integer in the allowed range, it should be passed through."""
limiter = query.Limiter()
search = elasticsearch_dsl.Search(
using="default", index=pyramid_request.es.index
using=pyramid_request.es.conn,
)

q = limiter(search, {"limit": str(lim)}).to_dict()
Expand All @@ -106,7 +106,7 @@ def test_limit_matches_input(self, pyramid_request, lim):
def test_limit_set_to_default_when_missing(self, pyramid_request):
limiter = query.Limiter()
search = elasticsearch_dsl.Search(
using="default", index=pyramid_request.es.index
using=pyramid_request.es.conn,
)

q = limiter(search, {}).to_dict()
Expand Down

0 comments on commit 2ee5dc5

Please sign in to comment.