mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
Merge d38ade7bc4
into 66aa6a47bd
This commit is contained in:
commit
9231d44d45
2 changed files with 6 additions and 17 deletions
|
@ -9,6 +9,7 @@ See also wallet_signer.py for tests that require wallet context.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
import sys
|
||||||
|
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import (
|
from test_framework.util import (
|
||||||
|
@ -20,10 +21,7 @@ from test_framework.util import (
|
||||||
class RPCSignerTest(BitcoinTestFramework):
|
class RPCSignerTest(BitcoinTestFramework):
|
||||||
def mock_signer_path(self):
|
def mock_signer_path(self):
|
||||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'signer.py')
|
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'signer.py')
|
||||||
if platform.system() == "Windows":
|
return sys.executable + " " + path
|
||||||
return "py -3 " + path
|
|
||||||
else:
|
|
||||||
return path
|
|
||||||
|
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.num_nodes = 4
|
self.num_nodes = 4
|
||||||
|
|
|
@ -8,7 +8,7 @@ Verify that a bitcoind node can use an external signer command
|
||||||
See also rpc_signer.py for tests without wallet context.
|
See also rpc_signer.py for tests without wallet context.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import platform
|
import sys
|
||||||
|
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import (
|
from test_framework.util import (
|
||||||
|
@ -24,24 +24,15 @@ class WalletSignerTest(BitcoinTestFramework):
|
||||||
|
|
||||||
def mock_signer_path(self):
|
def mock_signer_path(self):
|
||||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'signer.py')
|
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'signer.py')
|
||||||
if platform.system() == "Windows":
|
return sys.executable + " " + path
|
||||||
return "py -3 " + path
|
|
||||||
else:
|
|
||||||
return path
|
|
||||||
|
|
||||||
def mock_invalid_signer_path(self):
|
def mock_invalid_signer_path(self):
|
||||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'invalid_signer.py')
|
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'invalid_signer.py')
|
||||||
if platform.system() == "Windows":
|
return sys.executable + " " + path
|
||||||
return "py -3 " + path
|
|
||||||
else:
|
|
||||||
return path
|
|
||||||
|
|
||||||
def mock_multi_signers_path(self):
|
def mock_multi_signers_path(self):
|
||||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'multi_signers.py')
|
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'multi_signers.py')
|
||||||
if platform.system() == "Windows":
|
return sys.executable + " " + path
|
||||||
return "py -3 " + path
|
|
||||||
else:
|
|
||||||
return path
|
|
||||||
|
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.num_nodes = 2
|
self.num_nodes = 2
|
||||||
|
|
Loading…
Reference in a new issue