ametaireau/pelican — pull request #232 by MeirKriheli (2012-03-09 00:06:41+00:00)
Title: Make sure test passes for dates formatted as utf-8

On my system, test If DATETIME is set to a tuple, it should be used to override LOCALE:

======================================================================
FAIL: test_datetime (tests.test_contents.TestPage)
If DATETIME is set to a tuple, it should be used to override LOCALE
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/meir/devel/Projects/pelican/pelican/tests/test_contents.py", line 85, in test_datetime
self.assertEqual(page.locale_date, dt.strftime(_DEFAULT_CONFIG['DEFAULT_DATE_FORMAT']))
AssertionError: u"\u05d0' 13 \u05e1\u05e4\u05d8\u05de\u05d1\u05e8 2015" != "\xd7\x90' 13 \xd7\xa1\xd7\xa4\xd7\x98\xd7\x9e\xd7\x91\xd7\xa8 2015"

----------------------------------------------------------------------
Ran 11 tests in 0.034s

FAILED (failures=1)

They are actually the same of the utf-8 encoded string is converted unicode (as it should, since page.localte_date is unicode by itself).