Skip to content
Snippets Groups Projects
Unverified Commit 93704920 authored by Aarif's avatar Aarif Committed by GitHub
Browse files

Merge pull request #21652 from edx/BOM-474

BOM-474
parents c4796b12 76706553
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ import unittest
from datetime import datetime, timedelta, tzinfo
import ddt
import six
from mock import patch
from pytz import utc
......@@ -135,7 +136,8 @@ class StrftimeLocalizedTest(unittest.TestCase):
dtime = datetime(2013, 2, 14, 16, 41, 17)
self.assertEqual(expected, strftime_localized(dtime, fmt))
# strftime doesn't like Unicode, so do the work in UTF8.
self.assertEqual(expected, dtime.strftime(fmt.encode('utf8')).decode('utf8'))
self.assertEqual(expected.encode('utf-8') if six.PY2 else expected,
dtime.strftime(fmt.encode('utf-8') if six.PY2 else fmt))
@ddt.data(
("SHORT_DATE", "Feb 14, 2013"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment