Esempio n. 1
0
 def test_decide_vote_should_return_democrat(self):
     voter = Voter('first_name', 'last_name', 'Liberal', '12345')
     voter.decide_vote(mocked_democrat, 0.70)
     self.failUnless(voter.vote == 'Democrat')
Esempio n. 2
0
 def test_decide_vote_should_return_republican(self):
     voter = Voter('first_name', 'last_name', 'Liberal', '12345')
     voter.decide_vote(mocked_republican, 0.20)
     self.failUnless(voter.vote == 'Republican')
Esempio n. 3
0
 def test_decide_vote_should_return_null(self):
     voter = Voter('first_name', 'last_name', 'Liberal', '12345')
     voter.decide_vote(mocked_democrat_for_null, 0.99)
     self.failUnless(voter.vote == 'null')