<s> from django . template import Template , Context <EOL> from django . test import TestCase <EOL> from django . utils import translation <EOL> class TestCountriesTags ( TestCase ) : <EOL> TEMPLATE_COUNTRY = Template ( <EOL> "<STR_LIT>" ) <EOL> TEMPLATE_NAME = Template ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def test_country ( self ) : <EOL> rendered = self . TEMPLATE_COUNTRY . render ( Context ( { '<STR_LIT:code>' : '<STR_LIT>' } ) ) <EOL> self . assertEqual ( rendered , '<STR_LIT>' ) <EOL> def test_country_name ( self ) : <EOL> rendered = self . TEMPLATE_NAME . render ( Context ( { '<STR_LIT:code>' : '<STR_LIT>' } ) ) <EOL> self . assertEqual ( rendered , '<STR_LIT>' ) <EOL> def test_country_name_translated ( self ) : <EOL> with translation . override ( '<STR_LIT>' ) : <EOL> rendered = self . TEMPLATE_NAME . render ( Context ( { '<STR_LIT:code>' : '<STR_LIT>' } ) ) <EOL> self . assertEqual ( rendered , '<STR_LIT>' ) <EOL> def test_wrong_code ( self ) : <EOL> rendered = self . TEMPLATE_COUNTRY . render ( Context ( { '<STR_LIT:code>' : '<STR_LIT>' } ) ) <EOL> self . assertEqual ( rendered , '<STR_LIT>' ) <EOL> rendered = self . TEMPLATE_NAME . render ( Context ( { '<STR_LIT:code>' : '<STR_LIT>' } ) ) <EOL> self . assertEqual ( rendered , '<STR_LIT>' ) </s>
