Different crypto lib fixture
This commit is contained in:
parent
1e2dadf75e
commit
c474699695
1 changed files with 11 additions and 0 deletions
|
@ -98,12 +98,14 @@ from User import UserManager
|
|||
from File import FileServer
|
||||
from Connection import ConnectionServer
|
||||
from Crypt import CryptConnection
|
||||
from Crypt import CryptBitcoin
|
||||
from Ui import UiWebsocket
|
||||
from Tor import TorManager
|
||||
from Content import ContentDb
|
||||
from util import RateLimit
|
||||
from Db import Db
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def resetSettings(request):
|
||||
open("%s/sites.json" % config.data_dir, "w").write("{}")
|
||||
|
@ -118,6 +120,7 @@ def resetSettings(request):
|
|||
}
|
||||
""")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def resetTempSettings(request):
|
||||
data_dir_temp = config.data_dir + "-temp"
|
||||
|
@ -296,6 +299,7 @@ def file_server6(request):
|
|||
request.addfinalizer(stop)
|
||||
return file_server6
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def ui_websocket(site, file_server, user):
|
||||
class WsMock:
|
||||
|
@ -376,3 +380,10 @@ def db(request):
|
|||
|
||||
request.addfinalizer(stop)
|
||||
return db
|
||||
|
||||
|
||||
@pytest.fixture(params=["btctools", "openssl", "libsecp256k1"])
|
||||
def crypt_bitcoin_lib(request, monkeypatch):
|
||||
monkeypatch.setattr(CryptBitcoin, "lib_verify_best", request.param)
|
||||
CryptBitcoin.loadLib(request.param)
|
||||
return CryptBitcoin
|
||||
|
|
Loading…
Reference in a new issue