diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-06-10 09:59:20 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-11 20:18:36 +0200 |
| commit | 53ea535f13e988b13499a62bab3831eb44e19e06 (patch) | |
| tree | 54962632e1529962ae38c142e623974442add442 /tests/template_tests | |
| parent | 76b3fc5c8d8dffb441aaa08f75833888be2107af (diff) | |
Refs #27486 -- Added tests for filesizeformat filter.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_filesizeformat.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_filesizeformat.py b/tests/template_tests/filter_tests/test_filesizeformat.py index 2d2aa6743c..1e5e2dee4f 100644 --- a/tests/template_tests/filter_tests/test_filesizeformat.py +++ b/tests/template_tests/filter_tests/test_filesizeformat.py @@ -7,6 +7,8 @@ class FunctionTests(SimpleTestCase): def test_formats(self): tests = [ + (0, '0\xa0bytes'), + (1, '1\xa0byte'), (1023, '1023\xa0bytes'), (1024, '1.0\xa0KB'), (10 * 1024, '10.0\xa0KB'), @@ -28,6 +30,8 @@ class FunctionTests(SimpleTestCase): def test_localized_formats(self): tests = [ + (0, '0\xa0Bytes'), + (1, '1\xa0Byte'), (1023, '1023\xa0Bytes'), (1024, '1,0\xa0KB'), (10 * 1024, '10,0\xa0KB'), @@ -50,6 +54,7 @@ class FunctionTests(SimpleTestCase): def test_negative_numbers(self): tests = [ + (-1, '-1\xa0byte'), (-100, '-100\xa0bytes'), (-1024 * 1024 * 50, '-50.0\xa0MB'), ] |
