#NEWLINE# def test_localize_timestamp_handles_unicode( self ) : #NEWLINE# #INDENT# timestamp = datetime . datetime . utcnow ( ) . replace ( tzinfo = pytz . utc ) #NEWLINE# self . user . timezone = 'Europe/Moscow' #NEWLINE# self . user . locale = 'ru_RU' #NEWLINE# self . user . save ( ) #NEWLINE# tz = dates . get_timezone ( self . user . timezone ) #NEWLINE# locale = Locale ( self . user . locale ) #NEWLINE# formatted_date = dates . format_date ( timestamp , format = 'full' , locale = locale ) #NEWLINE# formatted_time = dates . format_time ( timestamp , format = 'short' , tzinfo = tz , locale = locale ) #NEWLINE# formatted_datetime = '{time} on {date}' . format ( time = formatted_time , date = formatted_date ) #NEWLINE# assert_equal ( emails . localize_timestamp ( timestamp , self . user ) , formatted_datetime )