File: test_endpoint.py

package info (click to toggle)
python-aiobotocore 2.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,524 kB
  • sloc: python: 15,437; makefile: 84
file content (11 lines) | stat: -rw-r--r-- 405 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
import pytest


async def test_invalid_endpoint_url(session, region):
    endpoint_url = 'invalid_url'
    with pytest.raises(ValueError, match=f'Invalid endpoint: {endpoint_url}'):
        async with session.create_client(
            'ec2', region_name=region, endpoint_url=endpoint_url
        ):
            # should not succeed in entering client context
            assert False  # pragma: no cover