Example #1
0
 def testHistorialAllocation(self):
     faction = Faction()
     for i in range(4):
         faction.allocationHistory.append((0, 0, 0))
     faction.allocationHistory.append((100, 100, 100))
     history = faction.getHistoricalAllocation()
     self.assertEqual(history[0], 20)
Example #2
0
 def testHistoricalAllocationAndStance(self):
     faction = Faction()
     faction.setupStanceList()
     for i in range(4):
         faction.allocationHistory.append((0, 0, 0))
     faction.allocationHistory.append((100, 100, 100))
     history = faction.getHistoricalAllocation()
     stance = faction.getStance(history[0], history[1], history[2])
     self.assertEqual(stance.name, 'conservative')