wren node: calibration setting, passed to wren's training as the installation's calibration records
This commit is contained in:
@@ -20,6 +20,7 @@ from tests.flow.conftest import FakeWren
|
||||
FLOW = "wren_house"
|
||||
PREFIX = f"{settings.API_V1_STR}/flows/{FLOW}/nodes"
|
||||
EXAMPLES = [{"command": "warmer please", "calls": [["living_room_heating", 22]]}]
|
||||
CALIBRATION = [{"command": "make it toasty", "calls": [["living_room_heating", 24]]}]
|
||||
TESTS = [
|
||||
{"command": "is it cold outside", "calls": [["outdoor_temperature"]]},
|
||||
{"command": "good night", "calls": []},
|
||||
@@ -49,6 +50,7 @@ def house(
|
||||
"outdoor_temperature": {"description": "temperature outside"},
|
||||
},
|
||||
"examples": EXAMPLES,
|
||||
"calibration": CALIBRATION,
|
||||
"tests": TESTS,
|
||||
},
|
||||
"requires": [
|
||||
@@ -121,7 +123,11 @@ def test_train_submits_the_node_as_wren_s_installation(
|
||||
"value": 0.0,
|
||||
},
|
||||
]
|
||||
assert (installation["examples"], installation["tests"]) == (EXAMPLES, TESTS)
|
||||
assert (
|
||||
installation["examples"],
|
||||
installation["calibration"],
|
||||
installation["tests"],
|
||||
) == (EXAMPLES, CALIBRATION, TESTS)
|
||||
|
||||
|
||||
def test_train_says_how_to_register_a_missing_training_flow(
|
||||
|
||||
Reference in New Issue
Block a user