'Test the {% get_current_timezone %} templatetag with pytz.'

@skipIf((pytz is None), u'this    test    requires    pytz')
def test_get_current_timezone_templatetag_with_pytz(self):

    tpl = Template(u'{%    load    tz    %}{%    get_current_timezone    as    time_zone    %}{{    time_zone    }}')
    with timezone.override(pytz.timezone(u'Europe/Paris')):
        self.assertEqual(tpl.render(Context()), u'Europe/Paris')
    tpl = Template(u"{%    load    tz    %}{%    timezone    'Europe/Paris'    %}{%    get_current_timezone    as    time_zone    %}{%    endtimezone    %}{{    time_zone    }}")
    self.assertEqual(tpl.render(Context()), u'Europe/Paris')
