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

@blocking_call_on_reactor_thread
def test_save_to_db(self):

    self.order_book.insert_ask(self.ask)
    self.order_book.insert_bid(self.bid)
    self.order_book.save_to_database()
    self.assertEqual(len(self.database.get_ticks()), 2)
