2020-07-24 16:09:30 +02:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
from tests.components.bank import Bank
|
|
|
|
from tests.components.config import Config
|
|
|
|
from tests.components.exchange import Exchange
|
2020-07-29 20:31:09 +02:00
|
|
|
from tests.components.merchant import Merchant
|
2020-07-24 16:09:30 +02:00
|
|
|
from tests.components.wallet import Wallet
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def config(watcher_getter, request, tmpdir, worker_id):
|
|
|
|
return Config(request, tmpdir, worker_id)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def exchange(watcher_getter, request, config):
|
|
|
|
exchange = Exchange(config, watcher_getter, request)
|
|
|
|
exchange.start()
|
|
|
|
return exchange
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def bank(watcher_getter, request, config):
|
|
|
|
bank = Bank(config, watcher_getter, request)
|
|
|
|
bank.start()
|
|
|
|
return bank
|
|
|
|
|
|
|
|
|
2020-07-29 20:31:09 +02:00
|
|
|
@pytest.fixture
|
|
|
|
def merchant(watcher_getter, request, config):
|
|
|
|
merchant = Merchant(config, watcher_getter, request)
|
|
|
|
merchant.start()
|
|
|
|
return merchant
|
|
|
|
|
|
|
|
|
2020-07-24 16:09:30 +02:00
|
|
|
@pytest.fixture
|
|
|
|
def wallet(watcher_getter, config):
|
|
|
|
return Wallet(config)
|