Commit Graph

2 Commits (dev)

Author SHA1 Message Date
elmurato 3eb0c8ddff
Add Pterodactyl binary sensor tests (#142401)
* Add binary sensor tests

* Wait for background tasks as well in test_binary_sensor_update_failure

* Fix module docstring

* Use snapshot_platform, move constants to const.py, do not use snapshot for testing state updates

* Use JSON fixtures

* Use helper for loading JSON fixtures, remove unneeded mock in setup_integration

* Move mocks to pytest markers where possible
2025-05-18 16:46:11 +02:00
elmurato e853df4fb0
Add Pterodactyl integration (#141197)
* Add Pterodactyl integration

* Remove translation for unavailable platform sensor, use constant for host

* Improve data descriptions

* Replace index based handling of data (list) with dict[str, PterodactylData]

* Replace CONF_HOST with CONF_URL

* Parse URL with YARL

* Set proper availability in binary sensor

* Remove storage of data within api.py

* Fix some review findings

* Use better unique ID for binary_sensor

* Fix more review findings

* Fix remaining review findings

* Add wrapper for server and util API, use underscore in unique ID

* Reuse result in config flow tests

* Patch async_setup_entry in config_flow tests

* Move patching of library APIs to the fixture mock_pterodactyl
2025-03-25 20:50:03 +01:00