'Test the transfer of money from a dummy wallet'

@deferred(timeout=10)
def test_transfer(self):

    def check_transactions(transactions):
        self.assertEqual(len(transactions), 1)
    def get_transactions(_):
        return self.dummy_wallet.get_transactions().addCallback(check_transactions)
    return self.dummy_wallet.transfer((self.dummy_wallet.balance - 1), None).addCallback(get_transactions)
