diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-09-26 14:29:38 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-09-26 14:29:38 (GMT) |
commit | 73987e8944f866e691ce4ddb2593ac7176aa0fae (patch) | |
tree | 8cb6704db63601f3f8601ae121db98c02192b81c /webapp | |
parent | f4f449f40affe15ab4ba572283cd206537565578 (diff) |
Refactor tests
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/polls/tests/poll_tests.py | 1 | ||||
-rw-r--r-- | webapp/polls/tests/result_tests.py | 16 |
2 files changed, 8 insertions, 9 deletions
diff --git a/webapp/polls/tests/poll_tests.py b/webapp/polls/tests/poll_tests.py index 19c36c1..0b3a168 100644 --- a/webapp/polls/tests/poll_tests.py +++ b/webapp/polls/tests/poll_tests.py @@ -188,7 +188,6 @@ class PollTests(MongoTestCase): def test_clone(self): poll = Poll(data={'name': 'name'}) - poll.status = Poll.CLOSED poll_id = poll.save() poll = Poll.get(poll_id) diff --git a/webapp/polls/tests/result_tests.py b/webapp/polls/tests/result_tests.py index 57ae49a..0936cf0 100644 --- a/webapp/polls/tests/result_tests.py +++ b/webapp/polls/tests/result_tests.py @@ -96,8 +96,7 @@ class PollResultTests(MongoTestCase): poll_data = { "name": "test", - "pollsters": [pollster], - "status": Poll.CLOSED + "pollsters": [pollster] } structure_data = { @@ -325,10 +324,7 @@ class CsvNoRepitePesoParaOpcionesConElMismoTextDescriptivo(MongoTestCase): """ def setUp(self): - poll_data = { - "name": "test", - "status": Poll.CLOSED - } + poll_data = {"name": "test"} question_name = "repite nombre pregunta" structure_data = { @@ -397,10 +393,14 @@ class CsvNoRepitePesoParaOpcionesConElMismoTextDescriptivo(MongoTestCase): poll = Poll(data=poll_data) poll_id = poll.save() - self.poll = Poll.get(poll_id) - structure = Structure(data=structure_data, poll=self.poll) + poll = Poll.get(poll_id) + structure = Structure(data=structure_data, poll=poll) structure.save() + poll.status = Poll.CLOSED + poll_id = poll.save() + self.poll = Poll.get(poll_id) + def test_get_csv_header_with_order(self): poll = self.poll |