#NEWLINE# def testTTGetPositionContent( self ) : #NEWLINE# #INDENT# '\n        {% get_position_content position as content %}\n        {% get_position_content position as content [limit=N] [as_contenttype=True|False] %}\n        ' #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text1 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text2 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , t . text3 ) #NEWLINE# t = '{% load position_tags %}{% get_position_content position as content %}{% for c in content %}{{ c }},{% endfor %}' #NEWLINE# self . assertEqual ( render ( t , { #NEWLINE# #INDENT# 'position' : self . samplePosition , #NEWLINE# #UNINDENT# } ) , 'Jenny,Bobby,Joe,' ) #NEWLINE# t = '{% load position_tags %}{% get_position_content position as content limit=2 %}{% for c in content %}{{ c }},{% endfor %}' #NEWLINE# self . assertEqual ( render ( t , { #NEWLINE# #INDENT# 'position' : self . samplePosition , #NEWLINE# #UNINDENT# } ) , 'Jenny,Bobby,' ) #NEWLINE# t = '{% load position_tags %}{% get_position_content position as content as_contenttype=False %}{% for c in content %}{{ c.content_object }},{% endfor %}' #NEWLINE# self . assertEqual ( render ( t , { #NEWLINE# #INDENT# 'position' : self . samplePosition , #NEWLINE# #UNINDENT# } ) , 'Jenny,Bobby,Joe,' )