Commit Graph

18 Commits (3322fa0294d3f4abcb8bf1b1803075b9674e1af1)

Author SHA1 Message Date
Robert Svensson 5eff4f9816
Unifi improve fixture typing (#122864)
* Improve typing of UniFi fixtures

* Improve fixture typing, excluding image, sensor, switch

* Improve fixture typing in image tests

* Improve fixtures typing in sensor tests

* Improve fixture typing in switch tests

* Fix review comment
2024-07-30 19:33:25 +02:00
Robert Svensson 08d7beb803
Use snapshots in UniFi update tests (#122599) 2024-07-25 17:32:31 +02:00
Robert Svensson 325352e197
Fixture cleanup in UniFi tests (#119227)
* Make sure all mock_device_registry are used with usefixtuers

* Make sure to use name with fixtures and rename functions to start with fixture_

* Streamline config_entry_setup

* Type all *_payload

* Mark @pytest.mark.usefixtures("mock_default_requests")

* Clean up unnecessary newlines after docstring
2024-06-09 16:07:36 -04:00
Robert Svensson c9911e4dd4
Rework UniFi tests to not use runtime data (#119202) 2024-06-09 15:56:26 +02:00
Robert Svensson c2e245f9d4
Use fixtures in UniFi update tests (#118818) 2024-06-04 21:00:50 +02:00
Marc Mueller 87165c0d6e
Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
Robert Svensson ab4750c2ea
Remove unnecessary access to UniFi hub object in tests (#112275)
* Remove unnecessary access to UniFi hub object

* Split strings

* Skip + on concatenating f-strings

* Use single quotes inside double quotes
2024-03-05 08:23:17 +01:00
Robert Svensson 2f026ca963
Unifi rename controller to hub (#110976)
* Rename controller.py to hub.py

* Rename UniFiController to UnifiHub

* Rename controller instances into hub

* Rename controller to hub in tests

* Rename aiounifi Controller references to api

* Update strings

* Rename test_controller test_hub

* Narrow scope of test_remove_sensors
2024-02-20 08:51:22 +01:00
Joseph Block 1271f16385
Add Unifi device state for additional diagnostics (#105138)
* Add device state for additional diagnostics

* Add state test and fix existing tests

* Utilize IntEnum and dict for state lookup

* Update aiounifi to v68
2023-12-16 08:38:21 +01:00
Robert Svensson 01b5854968
Rework UniFi websocket (#100614)
* Rework websocket management

* remove unnecessary fixture

* Remove controller from mock_unifi_websocket

* Mock api.login in reconnect method

* Remove unnecessary edits

* Minor clean up

* Bump aiounifi to v63

* Wait on task cancellation
2023-09-27 10:56:24 +02:00
Robert Svensson 9e42451934
UniFi refactor using site data (#98549)
* Clean up

* Simplify admin verification

* Streamline using sites in config_flow

* Bump aiounifi
2023-08-18 22:44:59 +02:00
epenet 9a5f88f55f
Add type hints to integration tests (part 23) (#88235) 2023-02-17 16:40:46 +01:00
epenet 278050a73f
Add type hints to integration tests (t-z) (#87707) 2023-02-08 19:10:53 +01:00
Robert Svensson 92eaa539b6
Simplify mocking UniFi websocket (#80652)
* Simplify mocking UniFi websocket

* Fix one more
2022-10-20 19:37:13 +02:00
Robert Svensson d0ed4b1ff2
Replace constants with enums in UniFi (#80637)
Replace constants with enums
Fix bad imports
2022-10-20 00:10:01 +03:00
Jelte Zeilstra 5e10716dd8
Do not access hass.data in unifi test (#75348)
* Do not access hass.data in test

* Process review feedback
2022-07-23 12:42:43 +02:00
Jelte Zeilstra 514e826fed
Add install UniFi device update feature (#75302)
* Add install UniFi device update feature

* Add tests for install UniFi device update feature

* Fix type error

* Process review feedback

* Process review feedback
2022-07-16 20:39:11 +02:00
Jelte Zeilstra 75058e63a4
Create Update entities for Ubiquiti network devices (#71700)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2022-05-13 09:17:41 +02:00