Beispiel #1
0
 def test_candidate7(self):
   a = candidate('Lando Calrissiam')
   b = ballot([1])
   for i in range(5):
     a.add_ballot(b)
   for item in a.ballot_list():
     assert str(item) == str([1])
Beispiel #2
0
 def test_candidate7(self):
     a = candidate('Lando Calrissiam')
     b = ballot([1])
     for i in range(5):
         a.add_ballot(b)
     for item in a.ballot_list():
         assert str(item) == str([1])
Beispiel #3
0
 def test_candidate8(self):
     a = candidate('m')
     b = [ballot([1, 2, 3]), ballot([2, 1, 3]), ballot([2, 1, 4])]
     for i in range(3):
         a.add_ballot(b[i])
     for i in range(len(a.ballot_list())):
         assert str(b[i]) == str(a.ballot_list()[i])
Beispiel #4
0
 def test_candidate8(self):  
   a = candidate('m')
   b = [ballot([1,2,3]),ballot([2,1,3]),ballot([2,1,4])]
   for i in range(3):
     a.add_ballot(b[i])
   for i in range(len(a.ballot_list())):
     assert str(b[i]) == str(a.ballot_list()[i])
Beispiel #5
0
 def test_candidate6(self):
   a = candidate([])
   assert(str(a) == '[]')
Beispiel #6
0
 def test_candidate5(self):
   a = candidate(9)
   assert(str(a) == '9')
Beispiel #7
0
 def test_candidate4(self):
   a= candidate('Bashmanogan')
   assert(str(a) == 'Bashmanogan')
Beispiel #8
0
 def test_candidate3(self):
   a = candidate('Snoopy')
   assert(a.vote_tot() == 0)    
Beispiel #9
0
 def test_candidate2(self):
   a = candidate('Branfordington')
   a.add_ballot(ballot())
   a.add_ballot(ballot())
   a.add_ballot(ballot()) 
   assert(a.vote_tot() == 3)
Beispiel #10
0
 def test_candidate1(self):
     a = candidate('Adam')
     a.add_ballot(ballot())
     assert (a.vote_tot() == 1)
Beispiel #11
0
 def test_candidate6(self):
     a = candidate([])
     assert (str(a) == '[]')
Beispiel #12
0
 def test_candidate5(self):
     a = candidate(9)
     assert (str(a) == '9')
Beispiel #13
0
 def test_candidate4(self):
     a = candidate('Bashmanogan')
     assert (str(a) == 'Bashmanogan')
Beispiel #14
0
 def test_candidate3(self):
     a = candidate('Snoopy')
     assert (a.vote_tot() == 0)
Beispiel #15
0
 def test_candidate2(self):
     a = candidate('Branfordington')
     a.add_ballot(ballot())
     a.add_ballot(ballot())
     a.add_ballot(ballot())
     assert (a.vote_tot() == 3)
Beispiel #16
0
 def test_candidate1(self):
   a = candidate('Adam')
   a.add_ballot(ballot())
   assert(a.vote_tot() == 1)    
Beispiel #17
0
 def test_candidate9(self):
   a = candidate('Lock')
   str(a.ballot_list()) == str([])   
Beispiel #18
0
 def test_candidate9(self):
     a = candidate('Lock')
     str(a.ballot_list()) == str([])