Correct unitary test following PR #1873

This commit is contained in:
Nicolas Hennion 2021-06-11 17:12:07 +02:00
parent 0e9e5e9512
commit 1f90393a03

View File

@ -343,12 +343,12 @@ class TestGlances(unittest.TestCase):
# GlancesHistory # GlancesHistory
from glances.history import GlancesHistory from glances.history import GlancesHistory
h = GlancesHistory() h = GlancesHistory()
h.add('a', 1) h.add('a', 1, history_max_size=100)
h.add('a', 2) h.add('a', 2, history_max_size=100)
h.add('a', 3) h.add('a', 3, history_max_size=100)
h.add('b', 10) h.add('b', 10, history_max_size=100)
h.add('b', 20) h.add('b', 20, history_max_size=100)
h.add('b', 30) h.add('b', 30, history_max_size=100)
self.assertEqual(len(h.get()), 2) self.assertEqual(len(h.get()), 2)
self.assertEqual(len(h.get()['a']), 3) self.assertEqual(len(h.get()['a']), 3)
h.reset() h.reset()