Skip to content

Commit

Permalink
Bump pybirdbuddy [fixes #89] (#90)
Browse files Browse the repository at this point in the history
* Bump pybirdbuddy [fixes #89]

* Bump HA requirements

* Bump test dependencies

* Fix 3.11 dependencies, maybe?

* Stop testing 3.11

* Update tests
  • Loading branch information
jhansche authored Jan 11, 2025
1 parent 6aa300f commit 910eb1d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion custom_components/birdbuddy/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"requirements": [
"python-graphql-client==0.4.3",
"pybirdbuddy==0.0.18"
"pybirdbuddy==0.0.19"
],
"ssdp": [],
"version": "0.0.21",
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "Bird Buddy",
"render_readme": true,
"country": "US",
"homeassistant": "2023.7.0"
"homeassistant": "2024.4.0"
}
22 changes: 14 additions & 8 deletions requirements.test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ python-graphql-client==0.4.3
-e git+https://github.com/jhansche/pybirdbuddy.git@main#egg=pybirdbuddy

# for tests
coverage==7.2.4
pytest==7.3.1
pytest-cov==3.0.0
pytest-aiohttp==1.0.4
pytest-asyncio==0.20.3
pytest-unordered==0.5.2
py==1.10.0 # Fixes pytest-sugar 0.9.5
pytest-homeassistant-custom-component==0.13.42
# For Python 3.12 and above
pytest-homeassistant-custom-component==0.13.128; python_version >= '3.12'

# For Python 3.11
pytest-homeassistant-custom-component==0.13.42; python_version < '3.12'

coverage
pytest
pytest-cov
pytest-aiohttp
pytest-asyncio
pytest-unordered
py
propcache
6 changes: 2 additions & 4 deletions tests/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ async def test_does_not_fire_on_postcard_event_for_other_feeder(hass, calls):

async def test_config_schema(hass, device_reg):
"""Test we get the expected triggers from a birdbuddy."""
config_entry = MockConfigEntry(domain="birdbuddy", data={})
config_entry = MockConfigEntry(domain="birdbuddy", data={}, state=ConfigEntryState.LOADED)
config_entry.add_to_hass(hass)
config_entry.state = ConfigEntryState.LOADED
device_entry = device_reg.async_get_or_create(
config_entry_id=config_entry.entry_id,
identifiers={(DOMAIN, "feeder1")},
Expand All @@ -125,9 +124,8 @@ async def test_config_schema(hass, device_reg):

async def test_config_schema_no_coordinator(hass, device_reg):
"""Test we get the expected triggers from a birdbuddy."""
config_entry = MockConfigEntry(domain="birdbuddy", data={})
config_entry = MockConfigEntry(domain="birdbuddy", data={}, state=ConfigEntryState.LOADED)
config_entry.add_to_hass(hass)
config_entry.state = ConfigEntryState.LOADED
device_entry = device_reg.async_get_or_create(
config_entry_id=config_entry.entry_id,
identifiers={(DOMAIN, "feeder1")},
Expand Down
9 changes: 3 additions & 6 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ async def test_setup_entry(hass: HomeAssistant):
"email": "[email protected]",
"password": "test-password",
}
config_entry = MockConfigEntry(domain="birdbuddy", data=config)
config_entry = MockConfigEntry(domain="birdbuddy", data=config, state=ConfigEntryState.NOT_LOADED)
config_entry.add_to_hass(hass)
config_entry.state = ConfigEntryState.NOT_LOADED

with patch(
"birdbuddy.client.BirdBuddy.refresh",
Expand All @@ -44,9 +43,8 @@ async def test_setup_entry_no_feeders(hass: HomeAssistant):
"email": "[email protected]",
"password": "test-password",
}
config_entry = MockConfigEntry(domain="birdbuddy", data=config)
config_entry = MockConfigEntry(domain="birdbuddy", data=config, state=ConfigEntryState.NOT_LOADED)
config_entry.add_to_hass(hass)
config_entry.state = ConfigEntryState.NOT_LOADED

with patch(
"birdbuddy.client.BirdBuddy.refresh",
Expand All @@ -64,9 +62,8 @@ async def test_setup_entry_refresh_fails(hass: HomeAssistant):
"email": "[email protected]",
"password": "test-password",
}
config_entry = MockConfigEntry(domain="birdbuddy", data=config)
config_entry = MockConfigEntry(domain="birdbuddy", data=config, state=ConfigEntryState.NOT_LOADED)
config_entry.add_to_hass(hass)
config_entry.state = ConfigEntryState.NOT_LOADED

with patch(
"birdbuddy.client.BirdBuddy.refresh",
Expand Down

0 comments on commit 910eb1d

Please sign in to comment.