Skip to content

Commit

Permalink
Add test for default value
Browse files Browse the repository at this point in the history
Signed-off-by: merlinz01 <[email protected]>
  • Loading branch information
merlinz01 committed Nov 14, 2024
1 parent 7752471 commit 5996efc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test_opensearchpy/test_async/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,17 @@ async def test_ssl_context(self) -> None:
assert con.session.connector._ssl == context

async def test_ssl_assert_hostname(self) -> None:
con = AIOHttpConnection(use_ssl=True, ssl_assert_hostname=True)
await con._create_aiohttp_session()
assert con.use_ssl
assert con.session.connector._ssl.check_hostname is True

con = AIOHttpConnection(use_ssl=True, ssl_assert_hostname=False)
await con._create_aiohttp_session()
assert con.use_ssl
assert con.session.connector._ssl.check_hostname is False


async def test_opaque_id(self) -> None:
con = AIOHttpConnection(opaque_id="app-1")
assert con.headers["x-opaque-id"] == "app-1"
Expand Down

0 comments on commit 5996efc

Please sign in to comment.