|
35 | 35 | import logging |
36 | 36 | import random |
37 | 37 | from time import sleep |
38 | | -from typing import Optional |
39 | 38 |
|
40 | 39 | from mobly import asserts |
41 | 40 | from support_modules.cadmin_support import CADMINBaseTest |
@@ -66,23 +65,6 @@ async def OpenCommissioningWindow(self, th, expectedErrCode) -> CommissioningPar |
66 | 65 | asserts.assert_true(errcode.sdk_code == expectedErrCode, |
67 | 66 | 'Unexpected error code returned from CommissioningComplete') |
68 | 67 |
|
69 | | - async def OpenBasicCommissioningWindow(self, th: ChipDeviceCtrl, expectedErrCode: Optional[Clusters.AdministratorCommissioning.Enums.StatusCode] = None) -> CommissioningParameters: |
70 | | - if not expectedErrCode: |
71 | | - params = await th.OpenBasicCommissioningWindow( |
72 | | - nodeId=self.dut_node_id, timeout=self.timeout) |
73 | | - return params |
74 | | - |
75 | | - else: |
76 | | - ctx = asserts.assert_raises(ChipStackError) |
77 | | - with ctx: |
78 | | - await th.OpenBasicCommissioningWindow( |
79 | | - nodeId=self.dut_node_id, timeout=self.timeout) |
80 | | - errcode = ctx.exception.chip_error |
81 | | - logging.info('Commissioning complete done. Successful? {}, errorcode = {}'.format(errcode.is_success, errcode)) |
82 | | - asserts.assert_false(errcode.is_success, 'Commissioning complete did not error as expected') |
83 | | - asserts.assert_true(errcode.sdk_code == expectedErrCode, |
84 | | - 'Unexpected error code returned from CommissioningComplete') |
85 | | - |
86 | 68 | def steps_TC_CADMIN_1_11(self) -> list[TestStep]: |
87 | 69 | return [ |
88 | 70 | TestStep(1, "Commissioning, already done", is_commissioning=True), |
|
0 commit comments