Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 4d42225

Browse files
committed
Test AIOHttpConnection auth with explicit event loop.
1 parent 223ae8f commit 4d42225

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test_elasticsearch_async/test_connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ def test_info(connection):
1919
assert status == 200
2020
assert {'body': '', 'method': 'GET', 'params': {}, 'path': '/'} == data
2121

22-
def test_auth_is_set_correctly():
23-
connection = AIOHttpConnection(http_auth=('user', 'secret'))
22+
def test_auth_is_set_correctly(event_loop):
23+
connection = AIOHttpConnection(http_auth=('user', 'secret'), loop=event_loop)
2424
assert connection.session._default_auth == aiohttp.BasicAuth('user', 'secret')
2525

26-
connection = AIOHttpConnection(http_auth='user:secret')
26+
connection = AIOHttpConnection(http_auth='user:secret', loop=event_loop)
2727
assert connection.session._default_auth == aiohttp.BasicAuth('user', 'secret')
2828

2929
@mark.asyncio

0 commit comments

Comments
 (0)