Cover reported washer course table
This commit is contained in:
1 parent
13d2a38f5d
commit
863fe32526
2 files changed
+71
No files matched your search
@@ -54,6 +54,45 @@ class TestCourseHelpers:
|
|||||||
assert laundry.cycle_options({}) == []
|
assert laundry.cycle_options({}) == []
|
||||||
assert laundry.cycle_options({"/wm/editcourse/vs/0": {}}) == []
|
assert laundry.cycle_options({"/wm/editcourse/vs/0": {}}) == []
|
||||||
|
|
||||||
|
def test_decodes_reported_washer_course_table_including_personal_slots(self):
|
||||||
|
"""Real DA_WM_TP1_21_COMMON diagnostics, with every selectable
|
||||||
|
standard and personal-course code preserved in the device's order.
|
||||||
|
F1/F3 are part of the packed list; their labels come from the
|
||||||
|
companion personal-course resource tested below.
|
||||||
|
"""
|
||||||
|
resources = {
|
||||||
|
"/wm/editcourse/vs/0": {
|
||||||
|
"x.com.samsung.da.editCourseList": (
|
||||||
|
"EditCourseList_696F73757801719688706D6A76726C6E6B777479F1F3"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
assert laundry.cycle_options(resources) == [
|
||||||
|
"69",
|
||||||
|
"6F",
|
||||||
|
"73",
|
||||||
|
"75",
|
||||||
|
"78",
|
||||||
|
"01",
|
||||||
|
"71",
|
||||||
|
"96",
|
||||||
|
"88",
|
||||||
|
"70",
|
||||||
|
"6D",
|
||||||
|
"6A",
|
||||||
|
"76",
|
||||||
|
"72",
|
||||||
|
"6C",
|
||||||
|
"6E",
|
||||||
|
"6B",
|
||||||
|
"77",
|
||||||
|
"74",
|
||||||
|
"79",
|
||||||
|
"F1",
|
||||||
|
"F3",
|
||||||
|
]
|
||||||
|
|
||||||
def test_option_value(self):
|
def test_option_value(self):
|
||||||
opts = ["DeviceType_0167", "Course_1C", "GMT_04"]
|
opts = ["DeviceType_0167", "Course_1C", "GMT_04"]
|
||||||
assert laundry.option_value(opts, "Course") == "1C"
|
assert laundry.option_value(opts, "Course") == "1C"
|
||||||
|
|||||||
@@ -190,6 +190,38 @@ def test_confirmed_washer_table_02_missing_course_names():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def test_reported_washer_standard_courses_all_have_table_02_labels():
|
||||||
|
"""Every non-personal code in the reported washer's live course list
|
||||||
|
must resolve through the Table_02 catalog instead of appearing as raw
|
||||||
|
text. F1/F3 deliberately come from device-provided personal names.
|
||||||
|
"""
|
||||||
|
states = _load("en")["entity"]["select"]["washer_cycle_table_02"]["state"]
|
||||||
|
reported = {
|
||||||
|
"69",
|
||||||
|
"6f",
|
||||||
|
"73",
|
||||||
|
"75",
|
||||||
|
"78",
|
||||||
|
"01",
|
||||||
|
"71",
|
||||||
|
"96",
|
||||||
|
"88",
|
||||||
|
"70",
|
||||||
|
"6d",
|
||||||
|
"6a",
|
||||||
|
"76",
|
||||||
|
"72",
|
||||||
|
"6c",
|
||||||
|
"6e",
|
||||||
|
"6b",
|
||||||
|
"77",
|
||||||
|
"74",
|
||||||
|
"79",
|
||||||
|
}
|
||||||
|
|
||||||
|
assert reported <= states.keys()
|
||||||
|
|
||||||
|
|
||||||
def test_confirmed_dishwasher_course_names():
|
def test_confirmed_dishwasher_course_names():
|
||||||
states = _load("en")["entity"]["select"]["dishwasher_cycle"]["state"]
|
states = _load("en")["entity"]["select"]["dishwasher_cycle"]["state"]
|
||||||
assert {
|
assert {
|
||||||
|
|||||||
Reference in new issue
Block a user