<s> from __future__ import unicode_literals <EOL> from django . template import Context <EOL> from django . template . base import Template <EOL> from django . test . client import RequestFactory <EOL> import pytest <EOL> class TestRenderedTag ( object ) : <EOL> @ pytest . fixture ( autouse = True ) <EOL> def setup ( self ) : <EOL> self . loadstatement = '<STR_LIT>' <EOL> self . request_factory = RequestFactory ( ) <EOL> def test_can_render_a_formatted_text_on_the_fly ( self ) : <EOL> def get_rendered ( value ) : <EOL> request = self . request_factory . get ( '<STR_LIT:/>' ) <EOL> t = Template ( self . loadstatement + '<STR_LIT>' ) <EOL> c = Context ( { '<STR_LIT:value>' : value , '<STR_LIT>' : request } ) <EOL> rendered = t . render ( c ) <EOL> return rendered <EOL> assert get_rendered ( '<STR_LIT>' ) == '<STR_LIT>' </s>
