def testAllLowRankLegislationProposed(self):
     p1 = makePerson(1)
     p2 = makePerson(2)
     makeProposal(p1, proposed=True)
     makeProposal(p1, proposed=True)
     prop = makeProposal(p2)
     self.assertEquals(prop, getNextProposal())
 def testGetEarliestInRankGroup(self):
     p1 = makePerson(1)
     p2 = makePerson(1)
     prop = makeProposal(p2)
     makeProposal(p1)
     makeProposal(p2)
     self.assertEquals(prop, getNextProposal())
 def testAllLegislationProposed(self):
     p1 = makePerson(1)
     p2 = makePerson(2)
     makeProposal(p1, proposed=True)
     makeProposal(p2, proposed=True)
     makeProposal(p1, proposed=True)
     self.assertEquals(None, getNextProposal())
 def testIgnoreProposedLegislation(self):
     p1 = makePerson(1)
     p2 = makePerson(2)
     makeProposal(p1, proposed=True)
     makeProposal(p2)
     prop = makeProposal(p1)
     makeProposal(p1)
     self.assertEquals(prop, getNextProposal())
 def testGetLowestRankProposal(self):
     p1 = makePerson(1)
     p2 = makePerson(2)
     makeProposal(p2)
     prop = makeProposal(p1)
     self.assertEquals(prop, getNextProposal())
 def testOneCase(self):
     for i in range(20):
         makePerson(0)
     prop = makeProposal(makePerson(0))
     self.assertEquals(prop, getNextProposal())
 def testZeroCase(self):
     for i in range(20):
         makePerson(0)
     self.assertEquals(None, getNextProposal())
 def testNothing(self):
     self.assertEquals(None, getNextProposal())