Ejemplo n.º 1
0
 def test_extract_single_voting_stance_agn(self):
     """ Verifies stances for a single bill AGN are extracted."""
     vote = ResultData({"data" : self.BILL1, "outcome" : outcomes.AGN})
     result = member_analyze._extract_single_voting_stance(vote)
     self.assertEqual(len(result), len(self.bill1.stances_agn))
     for stance1, stance2 in zip(result, self.bill1.stances_agn):
         self.assertTrue(stance1.total_match(stance2))
Ejemplo n.º 2
0
 def test_extract_single_voting_stance_invalid_side(self):
     """ Verifies functionality when the side on the bill is invalid."""
     vote = ResultData({"data" : self.BILL1, "outcome" : "Random Value"})
     result = member_analyze._extract_single_voting_stance(vote)
     self.assertEquals(result, [])
Ejemplo n.º 3
0
 def test_extract_single_voting_stance_invalid_bill(self):
     """ Verifies functionality when the specified bill doesn't exist."""
     vote = ResultData({"data" : "DOES NOT EXIST", "outcome" : outcomes.FOR})
     result = member_analyze._extract_single_voting_stance(vote)
     self.assertEquals(result, [])