Skip to content

Commit

Permalink
[#2228] Add additional test for render_datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandar Jovanov authored and smotornyuk committed Jun 29, 2017
1 parent 04e25b8 commit a9771c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ckan/tests/legacy/lib/test_helpers.py
Expand Up @@ -39,6 +39,10 @@ def test_render_datetime_blank(self):
res = h.render_datetime(None)
assert_equal(res, '')

def test_render_datetime_year_before_1900(self):
res = h.render_datetime('1875-04-13T20:40:20.123456', date_format='%Y')
assert_equal(res, '1875')

def test_datetime_to_date_str(self):
res = datetime.datetime(2008, 4, 13, 20, 40, 20, 123456).isoformat()
assert_equal(res, '2008-04-13T20:40:20.123456')
Expand Down

0 comments on commit a9771c0

Please sign in to comment.