@@ -106,7 +106,7 @@ def write_to_app_pipe(self, command):
106
106
async def test_TC_RVCCLEANM_2_2 (self ):
107
107
# TODO Replace 0x8000 with python object of RVCCLEAN FEATURE bit map when implemented
108
108
# 0x8000 corresponds to 16 bit DIRECTMODECH Feature map
109
- self .directmodech_bit_map = 0x8000
109
+ self .directmodech_bit_mask = 0x8000
110
110
self .endpoint = self .matter_test_config .endpoint
111
111
self .is_ci = self .check_pics ("PICS_SDK_CI_ONLY" )
112
112
if self .is_ci :
@@ -175,21 +175,18 @@ async def test_TC_RVCCLEANM_2_2(self):
175
175
break
176
176
177
177
self .print_step ("7a" , "Read FeatureMap Attribute" )
178
- directmodech = await self .read_feature_map_attribute ()
179
- directmode_enabled = directmodech & self .directmodech_bit_map
178
+ feature_map = await self .read_feature_map_attribute ()
179
+ directmode_enabled = feature_map & self .directmodech_bit_mask
180
180
181
181
self .print_step ("7b" , "Send ChangeToMode command" )
182
+ response = await self .send_clean_change_to_mode_cmd (self .new_clean_mode_th )
183
+ asserts .assert_true (type_matches (response , Clusters .RvcCleanMode .Commands .ChangeToModeResponse ),
184
+ "The response should ChangeToModeResponse command" )
182
185
if directmode_enabled :
183
- response = await self .send_clean_change_to_mode_cmd (self .new_clean_mode_th )
184
- asserts .assert_true (type_matches (response , Clusters .RvcCleanMode .Commands .ChangeToModeResponse ),
185
- "The response should ChangeToModeResponse command" )
186
186
asserts .assert_equal (response .status , RvcStatusEnum .Success ,
187
187
"The response should contain a ChangeToModeResponse command "
188
188
"with the Status set to Success(0x0)." )
189
189
else :
190
- response = await self .send_clean_change_to_mode_cmd (self .new_clean_mode_th )
191
- asserts .assert_true (type_matches (response , Clusters .RvcCleanMode .Commands .ChangeToModeResponse ),
192
- "The response should ChangeToModeResponse command" )
193
190
asserts .assert_equal (response .status , RvcStatusEnum .InvalidInMode ,
194
191
"The response should contain a ChangeToModeResponse command "
195
192
"with the Status set to InvalidInMode(0x03)." )
0 commit comments