[tests/traffic] Fix tests for module traffic
This commit is contained in:
parent
afa1645e60
commit
bb2c92732e
1 changed files with 3 additions and 3 deletions
|
@ -14,10 +14,10 @@ class TestTrafficModule(unittest.TestCase):
|
||||||
|
|
||||||
def test_get_minwidth_str(self):
|
def test_get_minwidth_str(self):
|
||||||
# default value (two digits after dot)
|
# default value (two digits after dot)
|
||||||
self.assertEqual(self.module.get_minwidth_str(), "1000.00MB")
|
self.assertEqual(self.module.get_minwidth_str(), "1000.00KiB/s")
|
||||||
# integer value
|
# integer value
|
||||||
self.module._format = "{:.0f}"
|
self.module._format = "{:.0f}"
|
||||||
self.assertEqual(self.module.get_minwidth_str(), "1000MB")
|
self.assertEqual(self.module.get_minwidth_str(), "1000KiB/s")
|
||||||
# just one digit after dot
|
# just one digit after dot
|
||||||
self.module._format = "{:.1f}"
|
self.module._format = "{:.1f}"
|
||||||
self.assertEqual(self.module.get_minwidth_str(), "1000.0MB")
|
self.assertEqual(self.module.get_minwidth_str(), "1000.0KiB/s")
|
||||||
|
|
Loading…
Reference in a new issue