'Test whether ticks from the database are correctly restored to the order book'

@blocking_call_on_reactor_thread
def test_restore_from_db(self):

    self.database.add_tick(self.ask)
    self.database.add_tick(self.bid)
    self.order_book.restore_from_database()
    self.assertEqual(len(self.order_book.asks), 1)
    self.assertEqual(len(self.order_book.bids), 1)
