core
core copied to clipboard
Add Huawei LTE reauth flow
Proposed change
Adds reauth support to Huawei LTE.
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [ ] I have followed the development checklist
- [x] The code has been formatted using Black (
black --fast homeassistant tests) - [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [ ] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest. - [ ] New or updated dependencies have been added to
requirements_all.txt.
Updated by runningpython3 -m script.gen_requirements_all. - [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to
.coveragerc.
The integration reached or maintains the following Integration Quality Scale:
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [ ] 🏆 Platinum
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
Hey there @fphammerle, mind taking a look at this pull request as it has been labeled with an integration (huawei_lte) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Not sure what's up with codecov. The service view takes a long time to load, errors most of the time. And local run says:
$ pytest --cov=homeassistant.components.huawei_lte tests/components/huawei_lte
Test session starts (platform: linux, Python 3.9.0, pytest 7.1.3, pytest-sugar 0.9.5)
rootdir: /home/scop/Documents/code/home-assistant, configfile: pyproject.toml
plugins: rerunfailures-10.2, mock-3.6.1, aiohttp-0.3.0, freezegun-0.4.2, test-groups-1.0.3, forked-1.4.0, timeout-2.1.0, xdist-2.5.0, socket-0.5.1, cov-3.0.0, anyio-3.6.1, sugar-0.9.5, respx-0.19.2, requests-mock-1.10.0
collecting ...
tests/components/huawei_lte/test_config_flow.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓ 50% █████
✓✓ 56% █████▋
tests/components/huawei_lte/test_device_tracker.py ✓✓✓✓✓ 72% ███████▎
tests/components/huawei_lte/test_sensor.py ✓✓✓ 81% ████████▎
tests/components/huawei_lte/test_switches.py ✓✓✓✓✓✓ 100% ██████████
----------- coverage: platform linux, python 3.9.0-final-0 -----------
Name Stmts Miss Cover
------------------------------------------------------------------------
homeassistant/components/huawei_lte/config_flow.py 144 0 100%
homeassistant/components/huawei_lte/const.py 36 0 100%
homeassistant/components/huawei_lte/utils.py 10 0 100%
------------------------------------------------------------------------
TOTAL 190 0 100%
Results (2.91s):
32 passed