Пример #1
0
def vehicle(websession: aiohttp.ClientSession) -> RenaultVehicle:
    """Fixture for testing RenaultVehicle."""
    return RenaultVehicle(
        account_id=TEST_ACCOUNT_ID,
        vin=TEST_VIN,
        session=get_logged_in_session(websession),
    )
Пример #2
0
def test_init(websession: aiohttp.ClientSession) -> None:
    """Test RenaultClient initialisation."""
    assert RenaultClient(session=get_logged_in_session(websession), )

    assert RenaultClient(
        websession=websession,
        country=TEST_COUNTRY,
        locale_details=TEST_LOCALE_DETAILS,
        credential_store=get_logged_in_credential_store(),
    )
Пример #3
0
def test_init(websession: aiohttp.ClientSession) -> None:
    """Test RenaultVehicle initialisation."""
    assert RenaultVehicle(
        account_id=TEST_ACCOUNT_ID,
        vin=TEST_VIN,
        session=get_logged_in_session(websession),
    )

    assert RenaultVehicle(
        account_id=TEST_ACCOUNT_ID,
        vin=TEST_VIN,
        websession=websession,
        country=TEST_COUNTRY,
        locale_details=TEST_LOCALE_DETAILS,
        credential_store=get_logged_in_credential_store(),
    )
Пример #4
0
def account(websession: aiohttp.ClientSession) -> RenaultAccount:
    """Fixture for testing RenaultAccount."""
    return RenaultAccount(
        account_id=TEST_ACCOUNT_ID,
        session=get_logged_in_session(websession),
    )
Пример #5
0
def client(websession: aiohttp.ClientSession) -> RenaultClient:
    """Fixture for testing RenaultClient."""
    return RenaultClient(session=get_logged_in_session(websession), )