Test HTML output (unescaped).

pull/7/head
Ferry Boender 10 years ago
parent e8e99647fb
commit 561c566719
  1. 9
      test/test.py
  2. 14
      test/test_webapp.json

@ -353,6 +353,15 @@ class WebAppTest(unittest.TestCase):
r = requests.post('http://localhost:8002/submit', data, auth=self.auth_user) r = requests.post('http://localhost:8002/submit', data, auth=self.auth_user)
self.assertIn('string=<foo>', r.text) self.assertIn('string=<foo>', r.text)
def testOutputHTML(self):
data = {
"form_name": 'output_html',
"string": '<foo>'
}
r = requests.post('http://localhost:8002/submit', data, auth=self.auth_user)
print r.text
self.assertIn('string=<foo>', r.text)
def testUpload(self): def testUpload(self):
import random import random
f = file('data.raw', 'w') f = file('data.raw', 'w')

@ -51,6 +51,20 @@
} }
] ]
}, },
{
"name": "output_html",
"title": "Output html",
"description": "Output html",
"script": "test.sh",
"output": "html",
"fields": [
{
"name": "string",
"title": "This string should be unescaped in the output",
"type": "string"
}
]
},
{ {
"name": "validate", "name": "validate",
"title": "Validated form", "title": "Validated form",

Loading…
Cancel
Save