Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webapp/polls/tests/poll_tests.py
diff options
context:
space:
mode:
authorRogelio Mita <rogeliomita@activitycentral.com>2013-09-05 18:31:48 (GMT)
committer Rogelio Mita <rogeliomita@activitycentral.com>2013-09-05 18:31:48 (GMT)
commit959848291083beaf662ca027146b978986304433 (patch)
tree1c4ee4bc2df8014800c0737c3431fc62e1debc3b /webapp/polls/tests/poll_tests.py
parent6a9eb56a052b2dcdbc00956ae4479ff06c3ffa51 (diff)
Refactor: get_result method for a poll, return a PollResult object made with PollResultFiles
Diffstat (limited to 'webapp/polls/tests/poll_tests.py')
-rw-r--r--webapp/polls/tests/poll_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/webapp/polls/tests/poll_tests.py b/webapp/polls/tests/poll_tests.py
index b663d33..ac94bc8 100644
--- a/webapp/polls/tests/poll_tests.py
+++ b/webapp/polls/tests/poll_tests.py
@@ -368,6 +368,14 @@ class PollTests(MongoTestCase):
expected = settings.RESULT_BCK_ROOT
self.assertIn(expected, poll_with_id.results_path)
+ def test_it_should_a_PollResult_when_get_result(self):
+ poll = Poll(data={'name': "poll"})
+ poll_id = poll.save()
+ poll = Poll.get(poll_id)
+
+ poll_result = poll.get_result()
+ self.assertTrue(hasattr(poll_result, "to_csv"))
+
class PollFormTests(MongoTestCase):