#NEWLINE# def testTTCanBePositioned( self ) : #NEWLINE# #INDENT# '\n        {% can_be_positioned [object] as [varname] %}\n        {% can_be_positioned [content_type_id] [object_id] as [varname] %}\n        ' #NEWLINE# t = '{% load position_tags %}{% can_be_positioned object as canbe %}{% if canbe %}TRUE{% else %}FALSE{% endif %}' #NEWLINE# self . assertEqual ( render ( t , { #NEWLINE# #INDENT# 'object' : self . text1 , #NEWLINE# #UNINDENT# } ) , 'TRUE' ) #NEWLINE# t = '{% load position_tags %}{% can_be_positioned object as canbe %}{% if canbe %}TRUE{% else %}FALSE{% endif %}' #NEWLINE# self . assertEqual ( render ( t , { #NEWLINE# #INDENT# 'object' : self . cat1 , #NEWLINE# #UNINDENT# } ) , 'FALSE' ) #NEWLINE# ctype = ContentType . objects . get_for_model ( self . text1 ) #NEWLINE# t = '{% load position_tags %}{% can_be_positioned ctype.pk object.pk as canbe %}{% if canbe %}TRUE{% else %}FALSE{% endif %}' #NEWLINE# self . assertEqual ( render ( t , { #NEWLINE# #INDENT# 'object' : self . text1 , #NEWLINE# 'ctype' : ctype , #NEWLINE# #UNINDENT# } ) , 'TRUE' )