-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
35 lines (24 loc) · 810 Bytes
/
conftest.py
File metadata and controls
35 lines (24 loc) · 810 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
import pytest
from tests.e2e.helper import (
async_create_fixture_resource_and_delete,
create_fixture_resource_and_delete,
)
@pytest.fixture
def channel_id(e2e_config):
return e2e_config["helpdesk.channel.id"]
@pytest.fixture
def invalid_channel_id():
return "CHN-0000-0000-0000"
@pytest.fixture
def channel_data(short_uuid):
return {"name": f"E2E Channel {short_uuid}"}
@pytest.fixture
def created_channel(mpt_ops, channel_data):
with create_fixture_resource_and_delete(mpt_ops.helpdesk.channels, channel_data) as channel:
yield channel
@pytest.fixture
async def async_created_channel(async_mpt_ops, channel_data):
async with async_create_fixture_resource_and_delete(
async_mpt_ops.helpdesk.channels, channel_data
) as channel:
yield channel