forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow github requirements specs in hassfest for non-core integrations (…
…home-assistant#124925) * allow all requirements specs * remove unnecessary tests * Revert "remove unnecessary tests" This reverts commit 0a2af03. * Revert "allow all requirements specs" This reverts commit d15cd27. * be lenient only for custom integrations * don't allow blanks as requested --------- Co-authored-by: Martin Hjelmare <[email protected]>
- Loading branch information
Showing
2 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,22 @@ def test_validate_requirements_format_successful(integration: Integration) -> No | |
] | ||
assert validate_requirements_format(integration) | ||
assert len(integration.errors) == 0 | ||
|
||
|
||
def test_validate_requirements_format_github_core(integration: Integration) -> None: | ||
"""Test requirement that points to github fails with core component.""" | ||
integration.manifest["requirements"] = [ | ||
"git+https://github.com/user/[email protected]", | ||
] | ||
assert not validate_requirements_format(integration) | ||
assert len(integration.errors) == 1 | ||
|
||
|
||
def test_validate_requirements_format_github_custom(integration: Integration) -> None: | ||
"""Test requirement that points to github succeeds with custom component.""" | ||
integration.manifest["requirements"] = [ | ||
"git+https://github.com/user/[email protected]", | ||
] | ||
integration.path = Path("") | ||
assert validate_requirements_format(integration) | ||
assert len(integration.errors) == 0 |