File: conftest.py

package info (click to toggle)
python-odp-amsterdam 6.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: python: 526; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Fixtures for the ODP Amsterdam tests."""

from collections.abc import AsyncGenerator

import pytest
from aiohttp import ClientSession

from odp_amsterdam import ODPAmsterdam


@pytest.fixture(name="odp_amsterdam_client")
async def client() -> AsyncGenerator[ODPAmsterdam, None]:
    """ODP Amsterdam client fixture."""
    async with (
        ClientSession() as session,
        ODPAmsterdam(session=session) as odp_amsterdam_client,
    ):
        yield odp_amsterdam_client