def tx(session): wallet = payment.get_wallet(session) external_account = wallet.create_account( "external account {}".format(time.time())) session.flush() address = wallet.create_receiving_address( external_account, "tatianastore credit test {}".format(time.time())) return address.address
def tx2(session): wallet = payment.get_wallet(session) # Check the "external" store owner account got the payment external_account = wallet.get_or_create_account_by_name("external account") # We lose a bit in currency conversions forth and back self.assertAlmostEqual(self.btc_price, external_account.balance, 2) # This is account where the customer paid and it should be zero after crediting, as the btc has been credited away receiving_account = session.query(Account).get(account_id) logger.info("Checking account %s", receiving_account) self.assertAlmostEqual(receiving_account.balance, 0, 2)
def tx2(session): wallet = payment.get_wallet(session) # Check the "external" store owner account got the payment external_account = wallet.get_or_create_account_by_name( "external account") # We lose a bit in currency conversions forth and back self.assertAlmostEqual(self.btc_price, external_account.balance, 2) # This is account where the customer paid and it should be zero after crediting, as the btc has been credited away receiving_account = session.query(Account).get(account_id) logger.info("Checking account %s", receiving_account) self.assertAlmostEqual(receiving_account.balance, 0, 2)
def tx(session): wallet = payment.get_wallet(session) external_account = wallet.create_account("external account {}".format(time.time())) session.flush() address = wallet.create_receiving_address(external_account, "tatianastore credit test {}".format(time.time())) return address.address