Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Chassis' object has no attribute 'get_num_psu' in test_psu.py #35

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sonic-pde-tests/sonic_pde_tests/test_psu.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def _wrapper_init():
except Exception as e:
print("Failed to load chassis due to {}".format(repr(e)))

def _wrapper_get_num_psu():
def _wrapper_get_num_psus():
_wrapper_init()
if platform_chassis is not None:
try:
return platform_chassis.get_num_psu()
return platform_chassis.get_num_psus()
except NotImplementedError:
pass

Expand Down Expand Up @@ -140,7 +140,7 @@ def test_for_num_psus(json_config_data):
}
}
"""
assert _wrapper_get_num_psu() == json_config_data['PLATFORM']['num_psus'],"System plugin reports that {} psu are supported in platform".format(_wrapper_get_num_psu())
assert _wrapper_get_num_psus() == json_config_data['PLATFORM']['num_psus'],"System plugin reports that {} psu are supported in platform".format(_wrapper_get_num_psus())

def test_for_psu_present(json_config_data, json_test_data):
"""Test Purpose: Test Purpose: Verify that the PSUs that are present report as present in the PSU plugin.
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_for_psu_notpresent(json_config_data, json_test_data):
}

"""
num_psus = _wrapper_get_num_psu()
num_psus = _wrapper_get_num_psus()
for key in json_config_data:
for x in range (1, num_psus):
if _wrapper_get_psu_presence(x-1) == True:
Expand Down
Loading