Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial blueprint support #42469

Merged
merged 20 commits into from
Nov 2, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
  • Loading branch information
balloob and MartinHjelmare authored Nov 2, 2020
commit ddd1a86a33aabbe0a69ed62f5ea29d286258423f
22 changes: 2 additions & 20 deletions tests/components/blueprint/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,7 @@ def test_blueprint_update_metadata():
def test_blueprint_inputs(blueprint_1):
"""Test blueprint inputs."""
inputs = models.BlueprintInputs(
models.Blueprint(
{
"blueprint": {
"name": "Hello",
"domain": "automation",
"input": {"test-placeholder": None},
},
"example": Placeholder("test-placeholder"),
}
),
blueprint_1,
{"use_blueprint": {"path": "bla", "input": {"test-placeholder": 1}}},
)
inputs.validate()
Expand All @@ -104,16 +95,7 @@ def test_blueprint_inputs(blueprint_1):
def test_blueprint_inputs_validation(blueprint_1):
"""Test blueprint input validation."""
inputs = models.BlueprintInputs(
models.Blueprint(
{
"blueprint": {
"name": "Hello",
"domain": "automation",
"input": {"test-placeholder": None},
},
"example": Placeholder("test-placeholder"),
}
),
blueprint_1,
{"use_blueprint": {"path": "bla", "input": {"non-existing-placeholder": 1}}},
)
with pytest.raises(errors.MissingPlaceholder):
Expand Down