Merge pull request #185 from dod-ccpo/format-dollars

Add jinja filter to format dollars
This commit is contained in:
patricksmithdds
2018-08-20 12:00:03 -04:00
committed by GitHub
4 changed files with 34 additions and 7 deletions

15
tests/test_filters.py Normal file
View File

@@ -0,0 +1,15 @@
import pytest
from atst.filters import dollars
@pytest.mark.parametrize("input,expected", [
('0', '$0'),
('123.00', '$123'),
('1234567', '$1,234,567'),
('-1234', '$-1,234'),
('one', '$0'),
])
def test_dollar_fomatter(input, expected):
assert dollars(input) == expected