summaryrefslogtreecommitdiffstats
path: root/mirrors/tests/test_templatetags.py
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@archlinux.org>2019-02-18 20:39:28 +0100
committerJelle van der Waa <jelle@archlinux.org>2019-02-18 20:56:15 +0100
commitfdae105d968bcd29b2b31407a99882f66ab07de0 (patch)
tree965864a4be9956c3dabeec23745789dea068ca29 /mirrors/tests/test_templatetags.py
parent413c173c214fd7fa3e34d1559cf21f04ec8067cb (diff)
downloadarchweb-fdae105d968bcd29b2b31407a99882f66ab07de0.tar.gz
archweb-fdae105d968bcd29b2b31407a99882f66ab07de0.zip
mirrors: replace self-written floatvalue with floatformat
In 2013 floatformat was very slow in the mirror status page, these days floatformat is not that much slower.
Diffstat (limited to 'mirrors/tests/test_templatetags.py')
-rw-r--r--mirrors/tests/test_templatetags.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/mirrors/tests/test_templatetags.py b/mirrors/tests/test_templatetags.py
index 1d9e6389..ec9b61bd 100644
--- a/mirrors/tests/test_templatetags.py
+++ b/mirrors/tests/test_templatetags.py
@@ -2,7 +2,7 @@ from datetime import timedelta
from django.test import SimpleTestCase
-from mirrors.templatetags.mirror_status import duration, hours, floatvalue, percentage
+from mirrors.templatetags.mirror_status import duration, hours, percentage
class MirrorTemplateTagTest(SimpleTestCase):
@@ -21,13 +21,6 @@ class MirrorTemplateTagTest(SimpleTestCase):
self.assertEqual(hours(timedelta(hours=1)), '1 hour')
self.assertEqual(hours(timedelta(seconds=60*60)), '1 hour')
- def test_floatvalue(self):
- self.assertEqual(floatvalue(None), u'')
-
- self.assertEqual(floatvalue(123), '123.00')
- self.assertEqual(floatvalue(123.1), '123.10')
- self.assertEqual(floatvalue(123.1, 1), '123.1')
-
def test_percentage(self):
self.assertEqual(percentage(None), u'')
self.assertEqual(percentage(10), '1000.0%')