'Test searching within a price level'

def test_search_for_quantity_in_price_level(self):

    self.bid_order._order_id = self.ask.order_id
    self.order_book.insert_ask(self.ask)
    self.order_book.insert_ask(self.ask2)
    (_, trades) = self.price_time_strategy._search_for_quantity_in_price_level(None, Quantity(10, 'MC'), self.bid_order)
    self.assertFalse(trades)
    (_, trades) = self.price_time_strategy._search_for_quantity_in_price_level(self.order_book.get_tick(self.bid_order.order_id), Quantity(10, 'MC'), self.bid_order)
    self.assertFalse(trades)
    self.bid_order2.reserve_quantity_for_tick(self.ask2.order_id, Quantity(60, 'MC'))
    (_, trades) = self.price_time_strategy._search_for_quantity_in_price_level(self.order_book.get_tick(self.ask2.order_id), Quantity(10, 'MC'), self.bid_order2)
    self.assertFalse(trades)
