Test validation of missing mandatory properties in form field definitions.

pull/7/head
Ferry Boender 9 years ago
parent a9b7f81172
commit 32be95d232
  1. 7
      test/test.py
  2. 17
      test/test_formdefinition_missing_title.json

@ -261,6 +261,13 @@ class FormDefinitionTest(unittest.TestCase):
self.assertRaises(KeyError, fd.validate, form_values)
class FormDefinitionFieldMissingProperty(unittest.TestCase):
"""
"""
def testMissing(self):
self.assertRaises(KeyError, scriptform.ScriptForm, 'test_formdefinition_missing_title.json')
class WebAppTest(unittest.TestCase):
"""
Test the web app by actually running the server and making web calls to it.

@ -0,0 +1,17 @@
{
"title": "test",
"forms": [
{
"name": "test",
"title": "title",
"description": "description",
"script": "test.sh",
"fields": [
{
"name": "string",
"type": "string"
}
]
}
]
}
Loading…
Cancel
Save