Skip to content

Commit

Permalink
Merge pull request #35 from nonodark/local
Browse files Browse the repository at this point in the history
Fix 'Chassis' object has no attribute 'get_num_psu' in test_psu.py
  • Loading branch information
geans-pin authored Jan 30, 2024
2 parents 7709035 + 607e920 commit f2cc748
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit f2cc748

Please sign in to comment.