@ -371,6 +371,8 @@ class WebAppTest(unittest.TestCase):
self . assertIn ( ' checkbox=on ' , r . text )
self . assertIn ( ' checkbox=on ' , r . text )
self . assertIn ( ' select=option_a ' , r . text )
self . assertIn ( ' select=option_a ' , r . text )
os . unlink ( ' data.csv ' )
def testValidateIncorrectData ( self ) :
def testValidateIncorrectData ( self ) :
data = {
data = {
" form_name " : ' validate ' ,
" form_name " : ' validate ' ,
@ -405,6 +407,8 @@ class WebAppTest(unittest.TestCase):
self . assertIn ( ' Invalid value for radio button ' , r . text )
self . assertIn ( ' Invalid value for radio button ' , r . text )
self . assertIn ( ' Invalid value for dropdown ' , r . text )
self . assertIn ( ' Invalid value for dropdown ' , r . text )
os . unlink ( ' data.txt ' )
def testValidateRefill ( self ) :
def testValidateRefill ( self ) :
"""
"""
Ensure that field values are properly repopulated if there were any
Ensure that field values are properly repopulated if there were any
@ -440,6 +444,8 @@ class WebAppTest(unittest.TestCase):
self . assertIn ( ' value= " on " ' , r . text )
self . assertIn ( ' value= " on " ' , r . text )
self . assertIn ( ' selected>Option B ' , r . text )
self . assertIn ( ' selected>Option B ' , r . text )
os . unlink ( ' data.txt ' )
def testOutputEscaped ( self ) :
def testOutputEscaped ( self ) :
""" Form with ' escaped ' output should have HTML entities escaped """
""" Form with ' escaped ' output should have HTML entities escaped """
data = {
data = {