def test_gen_account(): client = testnet.create_client() account = testnet.gen_account(client, base_url="http://hello.com") child_vasp = testnet.gen_child_vasp(client, account) assert client.get_account( account.account_address).role.type == "parent_vasp" assert client.get_account( child_vasp.account_address).role.type == "child_vasp"
def test_get_base_url_and_compliance_key(): client = testnet.create_client() parent_vasp = testnet.gen_account(client, base_url="http://hello.com") child_vasp = testnet.gen_child_vasp(client, parent_vasp) base_url, key = client.get_base_url_and_compliance_key( child_vasp.account_address) assert base_url == "http://hello.com" assert utils.public_key_bytes( key) == parent_vasp.compliance_public_key_bytes base_url, key = client.get_base_url_and_compliance_key( parent_vasp.account_address) assert base_url == "http://hello.com" assert utils.public_key_bytes( key) == parent_vasp.compliance_public_key_bytes
def add_child_vasp(self) -> None: self.child_vasps.append(testnet.gen_child_vasp(self.jsonrpc_client, self.parent_vasp))
def add_child_vasp(self) -> jsonrpc.Transaction: self.child_vasps.append( testnet.gen_child_vasp(self.jsonrpc_client, self.parent_vasp))