-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathconftest.py
More file actions
40 lines (26 loc) · 922 Bytes
/
conftest.py
File metadata and controls
40 lines (26 loc) · 922 Bytes
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
39
40
from typing import Any
import pytest
from express.options import Options
from express.utils import get_config, read_json_file
from tests.mock.express import Express
INVENTORY_ITEM = read_json_file("./tests/jsons/inventory_item.json")
RECEIPT_ITEM = read_json_file("./tests/jsons/receipt_item.json")
bot_steam_id = "76561198828172881" # replace with your own for testing
config = get_config()
bot_options = Options(username=config["username"], **config["options"])
express = Express(bot_steam_id, bot_options)
@pytest.fixture
def inventory_item_data() -> dict[str, Any]:
return INVENTORY_ITEM
@pytest.fixture
def receipt_item_data() -> dict[str, Any]:
return RECEIPT_ITEM
@pytest.fixture
def steam_id() -> str:
return bot_steam_id
@pytest.fixture
def options() -> Options:
return bot_options
@pytest.fixture
def client() -> Express:
return express