File: conftest.py

package info (click to toggle)
python-powerfox 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 780 kB
  • sloc: python: 906; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 473 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 Powerfox tests."""

from collections.abc import AsyncGenerator

import pytest
from aiohttp import ClientSession

from powerfox import Powerfox


@pytest.fixture(name="powerfox_client")
async def client() -> AsyncGenerator[Powerfox, None]:
    """Return a Powerfox client."""
    async with (
        ClientSession() as session,
        Powerfox(username="user", password="pass", session=session) as powerfox_client,
    ):
        yield powerfox_client