diff --git a/tests/platform_tests/api/test_chassis_fans.py b/tests/platform_tests/api/test_chassis_fans.py index b5d1e1582ef..5603bd9cc74 100644 --- a/tests/platform_tests/api/test_chassis_fans.py +++ b/tests/platform_tests/api/test_chassis_fans.py @@ -46,7 +46,8 @@ class TestChassisFans(PlatformApiTestBase): # level, so we must do the same here to prevent a scope mismatch. @pytest.fixture(scope="function", autouse=True) - def setup(self, platform_api_conn, duthost): # noqa F811 + def setup(self, platform_api_conn, enum_rand_one_per_hwsku_hostname, duthosts): # noqa F811 + duthost = duthosts[enum_rand_one_per_hwsku_hostname] if self.num_fans is None: try: self.num_fans = int(chassis.get_num_fans(platform_api_conn))