def test_cli_missing_password_file_enter_password(raiden_testchain, cli_args, raiden_spawner): child = raiden_spawner(cli_args) expect_cli_until_acknowledgment(child) child.expect("Enter the password to unlock") with open(raiden_testchain["password_file"], "r") as password_file: password = password_file.readline() child.sendline(password) expect_cli_successful_connected(child, EXPECTED_DEFAULT_ENVIRONMENT_VALUE)
def test_cli_wrong_rpc_endpoint(cli_args, raiden_spawner): child = raiden_spawner(cli_args) try: expect_cli_until_acknowledgment(child) child.expect(".*Could not contact the Ethereum node through JSON-RPC.") except pexpect.TIMEOUT as e: print('Timed out at', e) finally: child.close()
def test_cli_wrong_keystore_path(cli_args, raiden_spawner): child = raiden_spawner(cli_args) try: expect_cli_until_acknowledgment(child) child.expect( 'No Ethereum accounts found in the provided keystore directory') except pexpect.TIMEOUT as e: print('PEXPECT timed out at', e) finally: child.close()
def test_cli_registry_address_without_deployed_contract( cli_args, raiden_spawner): child = raiden_spawner(cli_args) try: expect_cli_until_acknowledgment(child) child.expect('.*contract does not contain code') except pexpect.TIMEOUT as e: print('Timed out at', e) finally: child.close()
def test_cli_wrong_network_id_try_kovan(cli_args, raiden_spawner): child = raiden_spawner(cli_args) try: expect_cli_until_acknowledgment(child) child.expect( ".*The chosen ethereum network 'kovan' differs from the ethereum " "client 'smoketest'", ) except pexpect.TIMEOUT as e: print('Timed out at', e) finally: child.close()
def test_cli_missing_password_file_enter_password(raiden_testchain, cli_args, raiden_spawner): child = raiden_spawner(cli_args) try: expect_cli_until_acknowledgment(child) child.expect('Enter the password to unlock') with open(raiden_testchain['password_file'], 'r') as password_file: password = password_file.readline() child.sendline(password) expect_cli_successful_connected(child, EXPECTED_DEFAULT_ENVIRONMENT_VALUE) except pexpect.TIMEOUT as e: print('Timed out at', e) finally: child.close()
def test_cli_registry_address_without_deployed_contract(cli_args, raiden_spawner): child = raiden_spawner(cli_args) expect_cli_until_acknowledgment(child) child.expect(".*contract does not contain code")
def test_cli_wrong_network_id_try_kovan(cli_args, raiden_spawner): child = raiden_spawner(cli_args) expect_cli_until_acknowledgment(child) child.expect("The configured network.*differs from the Ethereum client's network")
def test_cli_wrong_rpc_endpoint(cli_args, raiden_spawner): child = raiden_spawner(cli_args) expect_cli_until_acknowledgment(child) child.expect(".*Could not contact the Ethereum node through JSON-RPC.")
def test_cli_wrong_keystore_path(cli_args, raiden_spawner): child = raiden_spawner(cli_args) expect_cli_until_acknowledgment(child) child.expect("No Ethereum accounts found in the provided keystore directory")
def test_cli_wrong_rpc_endpoint(cli_args, raiden_spawner): child = raiden_spawner(cli_args) expect_cli_until_acknowledgment(child) child.expect(".*Communicating with an external service failed.")