From 561c566719b1343daa1af6953da30703246735f5 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Tue, 30 Jun 2015 10:28:31 +0200 Subject: [PATCH] Test HTML output (unescaped). --- test/test.py | 9 +++++++++ test/test_webapp.json | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/test/test.py b/test/test.py index af61f37..988528a 100644 --- a/test/test.py +++ b/test/test.py @@ -353,6 +353,15 @@ class WebAppTest(unittest.TestCase): r = requests.post('http://localhost:8002/submit', data, auth=self.auth_user) self.assertIn('string=', r.text) + def testOutputHTML(self): + data = { + "form_name": 'output_html', + "string": '' + } + r = requests.post('http://localhost:8002/submit', data, auth=self.auth_user) + print r.text + self.assertIn('string=', r.text) + def testUpload(self): import random f = file('data.raw', 'w') diff --git a/test/test_webapp.json b/test/test_webapp.json index affc8b3..681e0d1 100644 --- a/test/test_webapp.json +++ b/test/test_webapp.json @@ -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", "title": "Validated form",