Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
plauric committed Jul 26, 2024
1 parent 8940579 commit bfb6629
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/python_testing/TC_SEAR_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async def test_TC_SEAR_1_2(self):

await self.read_and_validate_supported_maps(11)
new_supported_maps = self.mapid_list
asserts.assert_true(len(old_supported_maps > len(new_supported_maps)), f"Failed to remove map(s)")
asserts.assert_true(len(old_supported_maps) > len(new_supported_maps), f"Failed to remove map(s)")

#NOTE the following operations are all part of step 11 - read all these attributes and check the data consistency
# after removing map(s)
Expand Down Expand Up @@ -298,7 +298,7 @@ async def test_TC_SEAR_1_2(self):

await self.read_and_validate_supported_maps(15)
new_supported_maps = self.mapid_list
asserts.assert_true(len(old_supported_maps < len(new_supported_maps)), f"Failed to add map(s)")
asserts.assert_true(len(old_supported_maps) < len(new_supported_maps), f"Failed to add map(s)")

#NOTE the following operations are all part of step 15 - read all these attributes and check the data consistency
# after adding map(s)
Expand Down Expand Up @@ -331,7 +331,7 @@ async def test_TC_SEAR_1_2(self):

await self.read_and_validate_supported_areas(19)
new_supported_areas = self.areaid_list
asserts.assert_true(len(old_supported_areas > len(new_supported_areas)), f"Failed to remove area(s)")
asserts.assert_true(len(old_supported_areas) > len(new_supported_areas), f"Failed to remove area(s)")

#NOTE the following operations are all part of step 19 - read all these attributes and check the data consistency
# after removing areas(s)
Expand Down Expand Up @@ -363,7 +363,7 @@ async def test_TC_SEAR_1_2(self):

await self.read_and_validate_supported_areas(23)
new_supported_areas = self.areaid_list
asserts.assert_true(len(old_supported_areas < len(new_supported_areas)), f"Failed to add area(s)")
asserts.assert_true(len(old_supported_areas) < len(new_supported_areas), f"Failed to add area(s)")

#NOTE the following operations are all part of step 23 - read all these attributes and check the data consistency
# after removing areas(s)
Expand Down
6 changes: 3 additions & 3 deletions src/python_testing/TC_SEAR_1_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def test_TC_SEAR_1_3(self):
self.write_to_app_pipe('{"Name": "Reset"}')

supported_area_ids = await self.read_supported_areas(2)
asserts.assert_true(len(self.supported_areas > 0), f"SupportedAreas is empty")
asserts.assert_true(len(self.supported_areas) > 0, f"SupportedAreas is empty")
valid_area_id = supported_area_ids[0]
invalid_area_id = 1 + max(supported_area_ids)

Expand All @@ -121,7 +121,7 @@ async def test_TC_SEAR_1_3(self):
await self.send_cmd_select_areas_expect_response(4, [], Clusters.ServiceArea.SelectAreasStatus.kSuccess)

selected_areas = await self.read_selected_areas(5)
asserts.assert_true(len(selected_areas == 0), f"SelectedAreas should be empty")
asserts.assert_true(len(selected_areas) == 0, f"SelectedAreas should be empty")

await self.send_cmd_select_areas_expect_response(6, [invalid_area_id], Clusters.ServiceArea.SelectAreasStatus.kUnsupportedArea)

Expand All @@ -142,7 +142,7 @@ async def test_TC_SEAR_1_3(self):
await self.send_cmd_select_areas_expect_response(10, supported_area_ids, Clusters.ServiceArea.SelectAreasStatus.kSuccess)

selected_areas = await self.read_selected_areas(11)
asserts.assert_true(len(selected_areas == supported_area_ids), f"SelectedAreas({selected_areas}) should match SupportedAreas({supported_area_ids})")
asserts.assert_true(len(selected_areas) == len(supported_area_ids), f"SelectedAreas({selected_areas}) should match SupportedAreas({supported_area_ids})")

await self.send_cmd_select_areas_expect_response(12, supported_area_ids, Clusters.ServiceArea.SelectAreasStatus.kSuccess)

Expand Down

0 comments on commit bfb6629

Please sign in to comment.