aboutsummaryrefslogtreecommitdiff
path: root/tests/conftest.py
blob: 6bc801bac04caa361261d0dcb87e531ec5c77f89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import pytest

from tests.components.bank import Bank
from tests.components.config import Config
from tests.components.exchange import Exchange
from tests.components.merchant import Merchant
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


@pytest.fixture
def merchant(watcher_getter, request, config):
    merchant = Merchant(config, watcher_getter, request)
    merchant.start()
    return merchant


@pytest.fixture
def wallet(watcher_getter, config):
    return Wallet(config)