-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
54 lines (37 loc) · 1.29 KB
/
conftest.py
File metadata and controls
54 lines (37 loc) · 1.29 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import pytest
from tests.e2e.helper import (
async_create_fixture_resource_and_delete,
create_fixture_resource_and_delete,
)
@pytest.fixture(scope="session")
def chat_id(e2e_config):
return e2e_config["helpdesk.chat.id"]
@pytest.fixture(scope="session")
def invalid_chat_id():
return "CHT-0000-0000-0000"
@pytest.fixture
def chat_messages_service(mpt_ops, created_chat):
return mpt_ops.helpdesk.chats.messages(created_chat.id)
@pytest.fixture
def async_chat_messages_service(async_mpt_ops, created_chat):
return async_mpt_ops.helpdesk.chats.messages(created_chat.id)
@pytest.fixture
def chat_message_data(short_uuid):
return {
"content": f"e2e message - {short_uuid}",
}
@pytest.fixture
def created_chat_message(chat_messages_service, chat_message_data):
with create_fixture_resource_and_delete(
chat_messages_service, chat_message_data
) as chat_message:
yield chat_message
@pytest.fixture
async def async_created_chat_message(async_chat_messages_service, chat_message_data):
async with async_create_fixture_resource_and_delete(
async_chat_messages_service, chat_message_data
) as chat_message:
yield chat_message
@pytest.fixture(scope="session")
def invalid_chat_message_id():
return "MSG-0000-0000-0000"