diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-14 23:41:25 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-14 23:41:25 (GMT) |
commit | 9e8f3452b1183e917b1aca5fa49d3651840a0470 (patch) | |
tree | 4f3d65234bb0a6cb699d5ddbd3506e8c177238b1 /webapp/polls/tests/result_tests.py | |
parent | e555b7e2d85c42d4de564729088bd6fca7d4a12a (diff) |
BugFix: bad converions from unicode to string in poll results to csv.
Diffstat (limited to 'webapp/polls/tests/result_tests.py')
-rw-r--r-- | webapp/polls/tests/result_tests.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/webapp/polls/tests/result_tests.py b/webapp/polls/tests/result_tests.py index b86b6f7..d34858e 100644 --- a/webapp/polls/tests/result_tests.py +++ b/webapp/polls/tests/result_tests.py @@ -188,7 +188,7 @@ class PollResultTests(MongoTestCase): "1": { "widget_type": "RadioButton", "dependence": {}, - "name": "Q: RadioButton", + "name": "Q: RadioButton con ácento", "options": { "1370786178803": { "text": "option 2", @@ -202,7 +202,7 @@ class PollResultTests(MongoTestCase): }, "0": { "widget_type": "TextInput", - "name": "Q: TextInput", + "name": "Q: TextInput con ácento", "options": {} }, "3": { @@ -265,7 +265,7 @@ class PollResultTests(MongoTestCase): "text": "some text" } }, - "name": "Q: TextInput", + "name": "Q: TextInput con ácento", "widget_type": "TextInput" }, "1": { @@ -275,7 +275,7 @@ class PollResultTests(MongoTestCase): "weight": 1 } }, - "name": "Q: RadioButton", + "name": "Q: RadioButton con ácento", "widget_type": "RadioButton" }, "2": { @@ -346,10 +346,12 @@ class PollResultTests(MongoTestCase): poll_result = PollResult(data=result_data) - expected_header = "RUEE;DEPARTAMENTO;NUM_ESC;GRADO;GRUPO;" + \ - "TIPO_GRUPO;Q: TextInput;Q: RadioButton;Q: DropDownList;" + \ - "Q: ImageRadioButton;1370786178809;1370786178810;" + \ - "1370786178812;1370786178813;" + expected_header = unicode( + "RUEE;DEPARTAMENTO;NUM_ESC;GRADO;GRUPO;" + + "TIPO_GRUPO;Q: TextInput con ácento;Q: RadioButton con ácento;" + + "Q: DropDownList;" + + "Q: ImageRadioButton;1370786178809;1370786178810;" + + "1370786178812;1370786178813;", 'utf-8') self.assertEqual(expected_header, poll_result.get_csv_header()) csv = poll_result.to_csv() |