From 07bc8cd88d1b90f31c847982b88995b1d7b53432 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Mon, 6 Jul 2015 18:04:40 +0200 Subject: [PATCH] Test cases for select input type. --- test/test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test.py b/test/test.py index b784446..ee1bd95 100644 --- a/test/test.py +++ b/test/test.py @@ -349,6 +349,7 @@ class WebAppTest(unittest.TestCase): "password": "12345", "radio": "One", "checkbox": "on", + "select": "option_a", } import random @@ -368,6 +369,7 @@ class WebAppTest(unittest.TestCase): self.assertIn('password=12345', r.text) self.assertIn('radio=One', r.text) self.assertIn('checkbox=on', r.text) + self.assertIn('select=option_a', r.text) def testValidateIncorrectData(self): data = { @@ -380,6 +382,7 @@ class WebAppTest(unittest.TestCase): "text": "123456789", "password": "1234", "checkbox": "invalidvalue", + "select": "invalidvalue", } import random @@ -399,7 +402,9 @@ class WebAppTest(unittest.TestCase): self.assertIn('Minimum length is 10', r.text) self.assertIn('Minimum length is 5', r.text) self.assertIn('Only file types allowed: csv', r.text) - self.assertIn('Invalid value', r.text) + self.assertIn('Invalid value for radio button', r.text) + self.assertIn('Invalid value for dropdown', r.text) + def testOutputEscaped(self): """Form with 'escaped' output should have HTML entities escaped"""