From c4ec6ecb8f64231a9b6897d6010f39d329d81bb0 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Mon, 12 Aug 2019 09:57:28 +0200 Subject: [PATCH] Correct error in SMART unitest --- unitest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unitest.py b/unitest.py index e827c7f1..142997c0 100755 --- a/unitest.py +++ b/unitest.py @@ -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) -- GitLab