'Ensure the effect of order_batch is the same as multiple calls to
order.'

def test_batch_order_matches_multiple_orders(self):

    blotter1 = Blotter(self.sim_params.data_frequency)
    blotter2 = Blotter(self.sim_params.data_frequency)
    for i in range(1, 4):
        order_arg_lists = [(self.asset_24, (i * 100), MarketOrder()), (self.asset_25, (i * 100), LimitOrder(((i * 100) + 1)))]
        order_batch_ids = blotter1.batch_order(order_arg_lists)
        order_ids = []
        for order_args in order_arg_lists:
            order_ids.append(blotter2.order(*order_args))
        self.assertEqual(len(order_batch_ids), len(order_ids))
        self.assertEqual(len(blotter1.open_orders), len(blotter2.open_orders))
        for ((asset, _, _), order_batch_id, order_id) in zip(order_arg_lists, order_batch_ids, order_ids):
            self.assertEqual(len(blotter1.open_orders[asset]), len(blotter2.open_orders[asset]))
            self.assertEqual(order_batch_id, blotter1.open_orders[asset][(i - 1)].id)
            self.assertEqual(order_id, blotter2.open_orders[asset][(i - 1)].id)
