diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-09-12 21:02:09 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-09-12 21:02:09 (GMT) |
commit | cadf9ef090a8af9929755ce6279943e0c1661374 (patch) | |
tree | b18b13146d28cf7e574493a796df2cd3b32002fa /webapp/polls/tests/result_tests.py | |
parent | ebd064e6309d66df4891249b23aa8b621f94b3b7 (diff) |
Deleting dead code: save, valid and is_valid methods
Diffstat (limited to 'webapp/polls/tests/result_tests.py')
-rw-r--r-- | webapp/polls/tests/result_tests.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/webapp/polls/tests/result_tests.py b/webapp/polls/tests/result_tests.py index f3f6501..57ae49a 100644 --- a/webapp/polls/tests/result_tests.py +++ b/webapp/polls/tests/result_tests.py @@ -45,48 +45,12 @@ class PollResultTests(MongoTestCase): self.assertEqual(data, poll_result._data) - def test_validate(self): - - data = {'name': "poll #1"} - poll = Poll(data=data) - poll_id = poll.save() - - data = {'poll_id': poll_id} - poll_result = PollResult(data) - poll_result.save() - - new_poll_result = PollResult(data) - - validate = lambda: new_poll_result.validate() - - self.assertRaises(PollResult.ValidationError, validate) - - def test_validate_open_poll(self): - - data = {'name': "poll #1", 'status': Poll.OPEN} - poll = Poll(data=data) - poll_id = poll.save() - - data = {'poll_id': poll_id} - poll_result = PollResult(data) - - validate = lambda: poll_result.validate() - - self.assertRaises(PollResult.ValidationError, validate) - def test_to_python(self): data = {'poll_id': 'ID'} poll_result = PollResult(data) self.assertTrue('poll_id' in poll_result.to_python().keys()) - def test_save(self): - data = {'poll_id': "ID"} - poll_result = PollResult(data) - poll_result.save() - - self.assertEqual(1, self.db.poll_results.count()) - def test_merge_results(self): data = {'name': "poll #1"} poll = Poll(data=data) |