diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-07-30 14:07:46 (GMT) |
---|---|---|
committer | Code Raguet <ignacio.code@gmail.com> | 2013-07-30 14:09:26 (GMT) |
commit | 22fd4169dbda03de52dde2371ebd7feb05acf223 (patch) | |
tree | f114fb7078e2b024f403c150c07a840ce48f4304 /webapp/polls/tests/structure_tests.py | |
parent | 0eb5a5ee47e3efbb6f0a4ec4c86d93ec23d2a2bb (diff) |
first impression
Diffstat (limited to 'webapp/polls/tests/structure_tests.py')
-rw-r--r-- | webapp/polls/tests/structure_tests.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/webapp/polls/tests/structure_tests.py b/webapp/polls/tests/structure_tests.py index a91f854..8c2e931 100644 --- a/webapp/polls/tests/structure_tests.py +++ b/webapp/polls/tests/structure_tests.py @@ -219,3 +219,34 @@ class StructureTests(MongoTestCase): structure.add_group(group, group.order) self.assertEqual(expected, structure.to_python()) + + def test_structure_with_a_question_with_img(self): + + poll = Poll({"name": "poll name"}) + poll_id = poll.save() + poll = poll.get(poll_id) + img = "img" + data = { + 'groups': { + '0': { + 'name': "group name", + 'fields': { + '0': { + 'name': "field_0_0", + 'widget_type': Field.TextInput, + 'options': { + '131212': { + 'text': "text", + 'order': 0 + } + }, + 'img': img + } + } + } + } + } + + structure = Structure(data=data, poll=poll) + + self.assertEqual(img, structure.groups[0].fields[0].img) |