|
28 | 28 | utc_time_in_matter_epoch)
|
29 | 29 | from mobly import asserts, signals
|
30 | 30 | from taglist_and_topology_test_support import (TagProblem, create_device_type_list_for_root, create_device_type_lists,
|
31 |
| - find_tag_list_problems, find_tree_roots, get_all_children, |
| 31 | + find_tag_list_problems, find_tree_roots, flat_list_ok, get_all_children, |
32 | 32 | get_direct_children_of_root, parts_list_cycles, separate_endpoint_types)
|
33 | 33 |
|
34 | 34 |
|
@@ -304,6 +304,14 @@ def test_cycle_detection_and_splitting(self):
|
304 | 304 | cycles = parts_list_cycles(tree, endpoints)
|
305 | 305 | asserts.assert_equal(cycles, [2, 3, 4, 5, 9, 10, 13, 14, 16])
|
306 | 306 |
|
| 307 | + def test_flat_list(self): |
| 308 | + endpoints = self.create_example_topology() |
| 309 | + # check the aggregator endpoint to ensure it's ok - aggregator is on 11 |
| 310 | + asserts.assert_true(flat_list_ok(11, endpoints), "Incorrect failure on flat list") |
| 311 | + # Remove one of the sub-children endpoints from the parts list - it should fail |
| 312 | + endpoints[11][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList].remove(14) |
| 313 | + asserts.assert_false(flat_list_ok(11, endpoints), "Incorrect pass on flat list missing a part list entry") |
| 314 | + |
307 | 315 | def test_get_all_children(self):
|
308 | 316 | endpoints = self.create_example_topology()
|
309 | 317 | asserts.assert_equal(get_all_children(2, endpoints), {1, 3, 4, 5, 9}, "Child list for ep2 is incorrect")
|
|
0 commit comments