'Test whether a tick is inserted in the order book when we receive one'

@blocking_call_on_reactor_thread
def test_on_tick(self):

    self.market_community.on_tick([self.get_tick_message(self.ask), self.get_tick_message(self.bid)])
    self.assertEquals(1, len(self.market_community.order_book.asks))
    self.assertEquals(1, len(self.market_community.order_book.bids))
    ask_timestamp = float(self.ask.timestamp)
    self.ask.update_timestamp()
    self.market_community.on_tick([self.get_tick_message(self.ask)])
    self.assertEquals(1, len(self.market_community.order_book.asks))
    new_timestamp = self.market_community.order_book.get_tick(self.ask.order_id).tick.timestamp
    self.assertGreater(new_timestamp, ask_timestamp)
