Пример #1
0
 def test_04_house_remove(self):
     ri = RoundInfo(1, 'Round1', [mhi1])
     oi = OrderInfo(14, 'Road1')
     with self.assertRaises(ValueError) as e:
         ri.rem_house(oi)
     self.assertEqual(e.exception.args[0],
                      "Can only remove instances of HouseInfo")
Пример #2
0
 def test_09_house_remove(self):
     ri = RoundInfo(1, 'Round1', [mhi1, mhi2])
     ri.rem_house(mhi1)
     ri.rem_house(mhi2)
     self.assertEqual(ri._houses, [])
     with self.assertRaises(ValueError) as e:
         ri.rem_house(mhi1)
     self.assertEqual(e.exception.args[0], "House not present in round")
Пример #3
0
 def test_08_house_remove(self):
     ri = RoundInfo(1, 'Round1', [mhi1, mhi2])
     ri.rem_house(mhi1)
     self.assertEqual(ri._houses, [mhi2])