Add comments and
- Verify sending to a account causes getaccountaddress to generate new addresses.
- Verify sending to a account causes getreceivedbyaccount to return amount received.
- Verify ways setaccount updates the accounts of existing addresses.
Add comments and
Add comments and
- Verify sending to a account causes getaccountaddress to generate new addresses.
- Verify sending to a account causes getreceivedbyaccount to return amount received.
- Verify ways setaccount updates the accounts of existing addresses.
201 | + self.add_address(address) 202 | + self.receive_address = address 203 | + 204 | + def verify(self, node): 205 | + if self.receive_address is not None: 206 | + assert self.receive_address in self.addresses
Assert to detect if receive_address is incorrecly changed?
224 | + # address of a different account should reset the receiving address of 225 | + # the old account, causing getaccountaddress to return a brand new 226 | + # address. 227 | + if address == old_account.receive_address: 228 | + new_address = node.getaccountaddress(old_account.name) 229 | + assert_equal(new_address not in old_account.addresses, True)
assert ... not in ...;?
assert ... not in ...;?
Assert statements are skipped when python is run in optimized mode. I only use assert statements in tests when asserting conditions that indicate bugs in test setup, as opposed to conditions that could be caused by bugs in the code under test. (If you're familiar with google test framework, this is the distinction between CHECK and ASSERT_TRUE).
Thanks for the explanation, wasn't aware of this.
Is it worth since accounts is deprecated?
post merge utACK bc9c0a7