Exemple #1
0
 def test_adjust_vote_wont_touch_delegators_own_votes(self):
     vote = _voting_fixture(self.config)
     poll = vote.__parent__
     obj = self._cut(vote)
     obj.repr.enable_representative('one')
     obj.repr.represent('one', 'other')
     other = Vote(creators = ['other'])
     other.set_vote_data({'c': 3}, notify = False)
     poll['other'] = other
     obj = self._cut(other)
     obj.adjust_vote('other')
     self.assertEqual(vote.get_vote_data(), {'a': 1, 'b': 2})
     self.assertEqual(other.get_vote_data(), {'c': 3})
     self.assertEqual(obj.repr.represented_by('other'), 'one')