Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test_updater_thermal_check_min_max() (#121)
Fixes the following crash introduced by sonic-net/sonic-platform-daemons#102: ``` 01:33:00 ______________________ test_updater_thermal_check_min_max ______________________ 01:33:00 01:33:00 def test_updater_thermal_check_min_max(): 01:33:00 chassis = MockChassis() 01:33:00 01:33:00 thermal = MockThermal() 01:33:00 chassis.get_all_thermals().append(thermal) 01:33:00 01:33:00 chassis.set_modular_chassis(True) 01:33:00 chassis.set_my_slot(1) 01:33:00 temperature_updater = TemperatureUpdater(SYSLOG_IDENTIFIER, chassis) 01:33:00 01:33:00 temperature_updater.update() 01:33:00 slot_dict = temperature_updater.chassis_table.get('Thermal 1') 01:33:00 > assert slot_dict['minimum_temperature'] == str(thermal.get_minimum_recorded()) 01:33:00 E TypeError: 'NoneType' object has no attribute '__getitem__' 01:33:00 01:33:00 tests/test_thermalctld.py:341: TypeError ``` Signed-off-by: Petro Bratash <petrox.bratash@intel.com> Signed-off-by: Petro Bratash <petrox.bratash@intel.com>
- Loading branch information