diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-08-28 13:48:35 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-08-28 13:49:47 (GMT) |
commit | 146997b4e5c9cf3fe8e61cf819c07a135bd8a464 (patch) | |
tree | 4d46f3e2dc5aff9e795b7d45519ff7951478d329 /webapp/polls/tests/structure_tests.py | |
parent | d0ed15240ac4b151a55d22c570f7f753e6b164aa (diff) |
Bugfix issue 4542: Questions name can't contain ; char
Diffstat (limited to 'webapp/polls/tests/structure_tests.py')
-rw-r--r-- | webapp/polls/tests/structure_tests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/webapp/polls/tests/structure_tests.py b/webapp/polls/tests/structure_tests.py index cd10d56..4f28dd5 100644 --- a/webapp/polls/tests/structure_tests.py +++ b/webapp/polls/tests/structure_tests.py @@ -129,6 +129,25 @@ class StructureTests(MongoTestCase): self.assertEqual(2, len(group_1.errors)) + def test_not_valid_question_name(self): + data = { + 'groups': { + '0': { + 'name': 'group_0', + 'fields': { + '0': { + 'widget_type': 'TextInput', + 'name': ';' + }, + } + } + } + } + + structure = Structure(data=data, poll=self.poll) + + self.assertFalse(structure.is_valid()) + def test_invalid_structure(self): data = {} |