Correct error in SMART unitest

This commit is contained in:
nicolargo 2019-08-12 09:57:28 +02:00
parent 0be5c24ae9
commit c4ec6ecb8f
1 changed files with 4 additions and 0 deletions

View File

@ -268,7 +268,11 @@ class TestGlances(unittest.TestCase):
if not is_admin():
print("INFO: Not admin, SMART list should be empty")
assert len(stats_grab) == 0
elif stats_grab == {}:
print("INFO: Admin but SMART list is empty")
assert len(stats_grab) == 0
else:
print(stats_grab)
self.assertTrue(stat in stats_grab[0].keys(), msg='Cannot find key: %s' % stat)
print('INFO: SMART stats: %s' % stats_grab)