Ticket #15660: smart_if_broken_in.diff
File smart_if_broken_in.diff, 1.1 KB (added by , 14 years ago) |
---|
-
tests/regressiontests/templates/tests.py
110 110 def method(self): 111 111 return "OtherClass.method" 112 112 113 class ContainerInAClass: 114 some_list = [SomeClass, OtherClass] 115 container_in_a_class_instance = ContainerInAClass() 116 113 117 class TestObj(object): 114 118 def is_true(self): 115 119 return True … … 833 837 # Contains 834 838 'if-tag-in-01': ("{% if 1 in x %}yes{% else %}no{% endif %}", {'x':[1]}, "yes"), 835 839 'if-tag-in-02': ("{% if 2 in x %}yes{% else %}no{% endif %}", {'x':[1]}, "no"), 840 'if-tag-in-03': ("{% if a in b.some_list %}yes{% else %}no{% endif %}", {'a': SomeClass, 'b': container_in_a_class_instance}, "yes"), 836 841 'if-tag-not-in-01': ("{% if 1 not in x %}yes{% else %}no{% endif %}", {'x':[1]}, "no"), 837 842 'if-tag-not-in-02': ("{% if 2 not in x %}yes{% else %}no{% endif %}", {'x':[1]}, "yes"), 838 843