def test_reset_chain(project, write_project_file): data_dir = get_data_dir(project.project_dir, 'test-chain') ensure_path_exists(data_dir) chaindata_dir = get_chaindata_dir(data_dir) dapp_dir = get_dapp_dir(data_dir) nodekey_path = get_nodekey_path(data_dir) geth_ipc_path = get_geth_ipc_path(data_dir) ensure_path_exists(chaindata_dir) ensure_path_exists(dapp_dir) write_project_file(nodekey_path) write_project_file(geth_ipc_path) # sanity check assert os.path.exists(data_dir) assert os.path.exists(chaindata_dir) assert os.path.exists(dapp_dir) assert os.path.exists(nodekey_path) assert os.path.exists(geth_ipc_path) reset_chain(data_dir) assert os.path.exists(data_dir) assert not os.path.exists(chaindata_dir) assert not os.path.exists(dapp_dir) assert not os.path.exists(nodekey_path) assert not os.path.exists(geth_ipc_path)
def get_blockchain_dapp_dir(self, chain_name): warnings.warn(DeprecationWarning( "The `get_blockchain_dapp_dir` function has been deprecated and " "will be removed in subsequent releases" )) return get_dapp_dir(self.get_blockchain_data_dir(chain_name))