Validate UUID for tankerkoenig#32805
Merged
bdraco merged 2 commits intohome-assistant:devfrom Mar 21, 2020
Merged
Conversation
Instead of just validating against strings, use a custom validator, so that the format can be checked.
fb9f347 to
d0862b9
Compare
bdraco
requested changes
Mar 15, 2020
bdraco
approved these changes
Mar 21, 2020
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please address the comment in a new PR.
| from homeassistant.components.tankerkoenig import uuid4_string | ||
|
|
||
|
|
||
| class TestUUID4StringValidator(unittest.TestCase): |
Member
There was a problem hiding this comment.
All new tests must be standalone pytest test functions.
This was referenced Mar 21, 2020
balloob
pushed a commit
that referenced
this pull request
Mar 21, 2020
* Validate UUIDs against custom validator Instead of just validating against strings, use a custom validator, so that the format can be checked. * Add tests for custom UUID4 validator
Merged
20 tasks
guillempages
added a commit
to guillempages/home-assistant
that referenced
this pull request
Mar 22, 2020
This reverts commit 49c2a4a. The validation was causing more problems than it was fixing, so removed it completely
20 tasks
balloob
pushed a commit
that referenced
this pull request
Mar 22, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
Proposed change
Add custom validators for the UUIDs used in the tankerkoenig integration, instead of validating against generic strings.
Type of change
Example entry for
configuration.yaml:Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: