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 76f1c3a commit f90cdb1
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 @@ -34,6 +34,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 f90cdb1

Please sign in to comment.