Source

web2py-template / test_new_template.py

Diff from to

test_new_template.py

         self.do_it()
 
 
+    def test_some_unindentation_words_and_python_code_with_spaces(self):
+        self.input_ = '''{{def some_function(arg):
+if arg == 10:
+  return True
+ pass
+  something}} test'''
+        self.expected_output = '''def some_function(arg):
+    if arg == 10:
+        return True
+something
+response.write(" test", escape=False)'''
+        self.do_it()
+
 if __name__ == '__main__':
     if len(argv) == 1:
         import new_template