def test_12_order_iter(self): oi1 = OrderInfo('House1', 'Road2') oi2 = OrderInfo(14, 'Road1') ol = OrderList([oi1, oi2]) ri = RoundInfo(2, 'Round2', [mhi1, mhi2], ol) olit = ri.order_iter() self.assertEqual(next(olit), oi1) self.assertEqual(next(olit), oi2) with self.assertRaises(StopIteration): next(olit)
def test_11_order_iter(self): ri = RoundInfo(1, 'Round1', [mhi1, mhi2]) olit = ri.order_iter() with self.assertRaises(StopIteration): next(olit)