'Test the insertion and retrieval of a transaction in the database'

@blocking_call_on_reactor_thread
def test_add_get_transaction(self):

    self.database.add_transaction(self.transaction1)
    transactions = self.database.get_all_transactions()
    self.assertEqual(len(transactions), 1)
    self.assertEqual(len(self.database.get_payments(self.transaction1.transaction_id)), 1)
