<s> from django . template import TemplateSyntaxError <EOL> from django . test import SimpleTestCase <EOL> from . . utils import setup <EOL> class ForTagTests ( SimpleTestCase ) : <EOL> libraries = { '<STR_LIT>' : '<STR_LIT>' } <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag01 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag02 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_vars01 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:6> , <NUM_LIT:6> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_vars02 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:6> , <NUM_LIT:6> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_vars03 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:6> , <NUM_LIT:6> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_vars04 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:6> , <NUM_LIT:6> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' <EOL> '<STR_LIT>' } ) <EOL> def test_for_tag_vars05 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:6> , <NUM_LIT:6> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' <EOL> '<STR_LIT>' } ) <EOL> def test_for_tag_vars06 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:6> , <NUM_LIT:6> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack01 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack03 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack04 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack05 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack06 ( self ) : <EOL> with self . assertRaises ( TemplateSyntaxError ) : <EOL> self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack07 ( self ) : <EOL> with self . assertRaises ( TemplateSyntaxError ) : <EOL> self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack08 ( self ) : <EOL> with self . assertRaises ( TemplateSyntaxError ) : <EOL> self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack09 ( self ) : <EOL> """<STR_LIT>""" <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack13 ( self ) : <EOL> output = self . engine . render_to_string ( <EOL> '<STR_LIT>' , { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT>' ) , ( '<STR_LIT>' , <NUM_LIT:2> , '<STR_LIT>' ) ) } <EOL> ) <EOL> if self . engine . string_if_invalid : <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> else : <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_empty01 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_empty02 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : [ ] } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' <EOL> '<STR_LIT>' } ) <EOL> def test_for_tag_empty03 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : "<STR_LIT>" } ) <EOL> def test_for_tag_filter_ws ( self ) : <EOL> """<STR_LIT>""" <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT:s>' : '<STR_LIT:abc>' } ) <EOL> self . assertEqual ( output , '<STR_LIT:abc>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack10 ( self ) : <EOL> with self . assertRaisesMessage ( ValueError , '<STR_LIT>' ) : <EOL> self . engine . render_to_string ( <EOL> '<STR_LIT>' , <EOL> { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT>' ) , ( '<STR_LIT>' , <NUM_LIT:2> , '<STR_LIT>' ) ) } , <EOL> ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack11 ( self ) : <EOL> with self . assertRaisesMessage ( ValueError , '<STR_LIT>' ) : <EOL> self . engine . render_to_string ( <EOL> '<STR_LIT>' , <EOL> { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } , <EOL> ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack12 ( self ) : <EOL> with self . assertRaisesMessage ( ValueError , '<STR_LIT>' ) : <EOL> self . engine . render_to_string ( <EOL> '<STR_LIT>' , <EOL> { '<STR_LIT>' : ( ( '<STR_LIT>' , <NUM_LIT:1> , '<STR_LIT>' ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ) } <EOL> ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_for_tag_unpack14 ( self ) : <EOL> with self . assertRaisesMessage ( ValueError , '<STR_LIT>' ) : <EOL> self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : ( <NUM_LIT:1> , <NUM_LIT:2> ) } ) </s>
