diff --git a/tests/platform_tests/api/test_chassis.py b/tests/platform_tests/api/test_chassis.py index 79b5fdbdc8..439899b51c 100644 --- a/tests/platform_tests/api/test_chassis.py +++ b/tests/platform_tests/api/test_chassis.py @@ -530,13 +530,13 @@ def test_get_eeprom(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, def test_get_supervisor_slot(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn): if chassis.is_modular_chassis(platform_api_conn): sup_slot = chassis.get_supervisor_slot(platform_api_conn) - pytest_assert(isinstance(sup_slot, int), "supervisor slot is not type integer") + pytest_assert(isinstance(sup_slot, int) or isinstance(sup_slot, STRING_TYPE), "supervisor slot is not type integer") else: pytest.skip("skipped as this test is applicable to modular chassis only") def test_get_my_slot(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn): if chassis.is_modular_chassis(platform_api_conn): my_slot = chassis.get_my_slot(platform_api_conn) - pytest_assert(isinstance(my_slot, int), "supervisor slot is not type integer") + pytest_assert(isinstance(my_slot, int) or isinstance(my_slot, STRING_TYPE), "supervisor slot is not type integer") else: pytest.skip("skipped as this test is applicable to modular chassis only") diff --git a/tests/platform_tests/api/test_module.py b/tests/platform_tests/api/test_module.py index e4a3d01fbe..51d2fbf005 100644 --- a/tests/platform_tests/api/test_module.py +++ b/tests/platform_tests/api/test_module.py @@ -331,7 +331,7 @@ def test_get_slot(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, p for i in range(self.num_modules): slot_id = module.get_slot(platform_api_conn, i) if self.expect(slot_id is not None, "Unable to retrieve module {} slot id".format(i)): - self.expect(isinstance(slot_id, int), "Module {} slot id is not correct ".format(i)) + self.expect(isinstance(slot_id, int) or isinstance(slot_id, STRING_TYPE), "Module {} slot id is not correct ".format(i)) self.assert_expectations() def test_get_type(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):