Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bimmer_connected/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

_LOGGER = logging.getLogger(__name__)

_LOGGER.error("'bimmer_connected' is non-functional due to changes in the MyBMW API.")


@dataclass
class MyBMWAccount:
Expand Down
2 changes: 1 addition & 1 deletion bimmer_connected/tests/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ async def test_client_async_only(bmw_fixture: respx.Router):
with httpx.Client(
auth=MyBMWAuthentication(TEST_USERNAME, TEST_PASSWORD, TEST_REGION, hcaptcha_token=TEST_CAPTCHA)
) as client, pytest.raises(RuntimeError):
client.get("/eadrax-ucs/v1/presentation/oauth/config")
client.get("/eadrax-ucs/v1/presentation/oauth/config") # noqa: ASYNC212

with httpx.Client(auth=MyBMWLoginRetry()) as client, pytest.raises(RuntimeError):
client.get("/eadrax-ucs/v1/presentation/oauth/config")
Expand Down
8 changes: 4 additions & 4 deletions bimmer_connected/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_oauth_store_credentials(cli_home_dir: Path, bmw_fixture: respx.Router):
assert set(oauth_storage.keys()) == {"access_token", "refresh_token", "gcid", "session_id", "session_id_timestamp"}


@time_machine.travel("2021-11-28 21:28:59 +0000")
@time_machine.travel("2021-11-28 21:28:59+00:00")
@pytest.mark.usefixtures("cli_home_dir")
def test_oauth_load_credentials(cli_home_dir: Path, bmw_fixture: respx.Router):
"""Test loading and storing the oauth credentials."""
Expand Down Expand Up @@ -196,7 +196,7 @@ def test_oauth_load_credentials(cli_home_dir: Path, bmw_fixture: respx.Router):
assert oauth_storage["session_id"] == demo_oauth_data["session_id"]


@time_machine.travel("2021-11-28 21:28:59 +0000")
@time_machine.travel("2021-11-28 21:28:59+00:00")
@pytest.mark.usefixtures("cli_home_dir")
def test_oauth_load_credentials_old_session_id(cli_home_dir: Path, bmw_fixture: respx.Router):
"""Test loading and storing the oauth credentials and getting a new session_id."""
Expand All @@ -206,7 +206,7 @@ def test_oauth_load_credentials_old_session_id(cli_home_dir: Path, bmw_fixture:
"refresh_token": "demo_refresh_token",
"gcid": "demo_gcid",
"session_id": "demo_session_id",
"session_id_timestamp": 1636838939, # 2021-11-13 21:28:59 +0000
"session_id_timestamp": 1636838939, # 2021-11-13 21:28:59+00:00
}

(cli_home_dir / ".bimmer_connected.json").write_text(json.dumps(demo_oauth_data))
Expand All @@ -228,7 +228,7 @@ def test_oauth_load_credentials_old_session_id(cli_home_dir: Path, bmw_fixture:
assert oauth_storage["session_id_timestamp"] == pytest.approx(time.time(), abs=5)


@time_machine.travel("2021-11-28 21:28:59 +0000")
@time_machine.travel("2021-11-28 21:28:59+00:00")
@pytest.mark.usefixtures("cli_home_dir")
def test_oauth_store_credentials_on_error(cli_home_dir: Path, bmw_fixture: respx.Router):
"""Test loading and storing the oauth credentials, even if a call errors out."""
Expand Down
6 changes: 3 additions & 3 deletions bimmer_connected/tests/test_vehicle_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async def test_range_electric(caplog, bmw_fixture: respx.Router):
assert len(get_deprecation_warning_count(caplog)) == 0


@time_machine.travel("2021-11-28 21:28:59 +0000")
@time_machine.travel("2021-11-28 21:28:59+00:00")
@pytest.mark.asyncio
async def test_charging_end_time(caplog, bmw_fixture: respx.Router):
"""Test charging end time."""
Expand All @@ -186,7 +186,7 @@ async def test_charging_end_time(caplog, bmw_fixture: respx.Router):
assert len(get_deprecation_warning_count(caplog)) == 0


@time_machine.travel("2021-11-28 17:28:59 +0000")
@time_machine.travel("2021-11-28 17:28:59+00:00")
@pytest.mark.asyncio
async def test_plugged_in_waiting_for_charge_window(caplog, bmw_fixture: respx.Router):
"""I01_REX is plugged in but not charging, as its waiting for charging window."""
Expand Down Expand Up @@ -477,7 +477,7 @@ async def test_tires(bmw_fixture: respx.Router):
assert tires.rear_left.season == 2


@time_machine.travel("2021-11-28 21:28:59 +0000")
@time_machine.travel("2021-11-28 21:28:59+00:00")
@pytest.mark.asyncio
async def test_climate(bmw_fixture: respx.Router):
"""Test climate status."""
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ignore = [
"D100", # Missing docstring in public module
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"FURB171", # Membership test against single-item container
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison
"PLW1641", # Object does not implement `__hash__` method
Expand Down
Loading