'Shows time in user timezone.'

def test_user_timezone(self):

    value_test = datetime.fromordinal(733900)
    user = self.user_model.objects.get(username='admin')
    self.context['request'].user = user
    default_tz = pytz.timezone(settings.TIME_ZONE)
    user_tz = pytz.timezone(user.timezone)
    tzvalue = default_tz.localize(value_test)
    tzvalue = user_tz.normalize(tzvalue.astimezone(user_tz))
    value_expected = format_datetime(tzvalue, format='long', locale=u'en_US')
    value_returned = datetimeformat(self.context, value_test, format='longdatetime', output='json')
    eq_(value_returned, value_expected)
