def _test_settings_(test): _assert_doctest_(test) # Hardcoded expectation on test framework. import common return common.test_settings(_test_name_from_test_path_(test.filename))
import shutil import time from nose.tools import assert_equals, assert_not_equals, with_setup import common from waiting import wait from swagger_client.rest import ApiException from swagger_client.models.tx import Tx from swagger_client.models.spend_tx import SpendTx from swagger_client.models.contract_create_data import ContractCreateData from swagger_client.models.contract_call_data import ContractCallData from swagger_client.models.contract_call_input import ContractCallInput import keys settings = common.test_settings(__name__.split(".")[-1]) def test_contract_create(): test_settings = settings["test_contract_create"] (root_dir, node, external_api, top) = setup_node_with_tokens(test_settings, "node") internal_api = common.internal_api(node) private_key = keys.new_private() public_key = keys.public_key(private_key) alice_address = keys.address(public_key) test_settings["alice"]["pubkey"] = alice_address send_tokens_to_user("alice", test_settings, external_api, internal_api) encoded_tx, contract_address = get_unsigned_contract_create(alice_address, test_settings["create_contract"], external_api)
# coding: utf-8 from nose.tools import assert_equals, assert_not_equals, with_setup import common import time from py.tests.swagger_client.models.ping import Ping settings = common.test_settings(__name__) node = settings['node_to_test'] def setup_func(): if common.should_start_node(node): print("Node " + node + " starting") common.start_node(node) def teardown_func(): if common.should_start_node(node): print("Node " + node + " stopping") common.stop_node(node) @with_setup(setup_func, teardown_func) def test_get_top(): """ Testing of GET top HTTP endpoint """ api = common.external_api(node) top = api.get_top() @with_setup(setup_func, teardown_func) def test_ping():