Commit Graph

10 Commits (79c602f59c0db4f0515515457bc7a282e433fb4a)

Author SHA1 Message Date
Marc Mueller 921430d497
Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
Marc Mueller 33ed4fd862
Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
Erik Montnemery db8597a742
Reduce scope of JSON/XML test fixtures (#116197) 2024-04-25 19:12:36 -05:00
Joost Lekkerkerker be7c4295dc
Fix MyUplink tests (#113534) 2024-03-15 18:26:28 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Åke Strandberg 073fcfcd6f
Add tests for number of devices created in myuplink (#111816)
* Add tests for number of devices created

* Change default fixture to 2 devices in one system

* Update snapshot

* Change deviuce to test

* Merge tests to one module
2024-03-03 14:27:24 +01:00
Åke Strandberg c167001861
Add myuplink switch platform (#110810)
* Add switch platform

* Add mypulink switch platform

* Update tests according to review

* Address more review comments

* Adjust types

* More typing

* Fix typo

* Use constants in tests

* Revert constants

* Catch aiohttp.ClientError when API call fails

* Add test case for failed async_set_device_points call

* Test api failures for both toggle directions

* Use parametrize for testing switching
2024-02-22 11:27:46 +01:00
Åke Strandberg f5dad1d312
Add myuplink reauth flow (#110587)
* WIP test

* WIP

* WIP Reauth flow. Test fail otherways OK.

* Minor adjustments to tests

* Merge

* Merge

* Next level...

* Cleanup according to review

* It works!

* Simplify setup

* Remove default

* Remove files from PR

* Add back test_init

* Add back test_sensor

* Adjust error message

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-17 10:18:53 +01:00
Åke Strandberg fd0f093299
Add some myuplink tests (#110521)
* Add some myuplink tests

* Update fixtures for api endpoints

* Adjust according to review

* Update snapshot file

* Remove unneded fixtures and improve typing

* More cleanup

* One last session scope removed

* Fix typing

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-15 13:44:45 +01:00
Åke Strandberg 8376c07969
Add myuplink diagnostics download (#109925)
* Dump all relevant data from API

* Cleanup and adjust

* Redact serialNumber

* WIP

* Add fixtures

* WIP

* Tests for diagnostics completed

* Address review comments

* Change to fake token

* Add missed redact

* Improve mocks

* Resolve review comments
2024-02-12 10:56:06 +01:00