File tree Expand file tree Collapse file tree 6 files changed +16
-28
lines changed
Expand file tree Collapse file tree 6 files changed +16
-28
lines changed Original file line number Diff line number Diff line change 5656 "commerce.product.listing.id" : " LST-5489-0806" ,
5757 "commerce.product.template.id" : " TPL-1767-7355-0002" ,
5858 "commerce.user.id" : " USR-4303-2348" ,
59- "helpdesk.chat.id" : " CHT-5064-0262-3671" ,
60- "helpdesk.channel.id" : " CHL-5064-0262-3671" ,
6159 "commerce.subscription.agreement.id" : " AGR-2473-3299-1721" ,
6260 "commerce.subscription.id" : " SUB-3678-1831-2188" ,
6361 "commerce.subscription.product.item.id" : " ITM-1767-7355-0001" ,
Original file line number Diff line number Diff line change 66)
77
88
9- @pytest .fixture (scope = "session" )
10- def channel_id (e2e_config ):
11- return e2e_config ["helpdesk.channel.id" ] # FIXME: seed data
12-
13-
149@pytest .fixture (scope = "session" )
1510def invalid_channel_id ():
1611 return "CHN-0000-0000-0000"
Original file line number Diff line number Diff line change 66)
77
88
9- @pytest .fixture (scope = "session" )
10- def chat_id (e2e_config ):
11- return e2e_config ["helpdesk.chat.id" ]
12-
13-
149@pytest .fixture (scope = "session" )
1510def invalid_chat_id ():
1611 return "CHT-0000-0000-0000"
Original file line number Diff line number Diff line change 77
88
99@pytest .fixture
10- def chat_participants_service (mpt_ops , chat_id ):
11- return mpt_ops .helpdesk .chats .participants (chat_id )
10+ def chat_participants_service (mpt_ops , created_chat ):
11+ return mpt_ops .helpdesk .chats .participants (created_chat . id )
1212
1313
1414@pytest .fixture
15- def async_chat_participants_service (async_mpt_ops , chat_id ):
16- return async_mpt_ops .helpdesk .chats .participants (chat_id )
15+ def async_chat_participants_service (async_mpt_ops , created_chat ):
16+ return async_mpt_ops .helpdesk .chats .participants (created_chat . id )
1717
1818
1919@pytest .fixture
Original file line number Diff line number Diff line change 88pytestmark = [pytest .mark .flaky ]
99
1010
11- async def test_get_chat (async_mpt_ops , chat_id ):
11+ async def test_get_chat (async_mpt_ops , created_chat ):
1212 service = async_mpt_ops .helpdesk .chats
1313
14- result = await service .get (chat_id )
14+ result = await service .get (created_chat . id )
1515
16- assert result .id == chat_id
16+ assert result .id == created_chat . id
1717
1818
1919async def test_list_chats (async_mpt_ops ):
@@ -25,13 +25,13 @@ async def test_list_chats(async_mpt_ops):
2525 assert all (isinstance (chat , Chat ) for chat in result )
2626
2727
28- async def test_update_chat (async_mpt_ops , chat_id , short_uuid ):
28+ async def test_update_chat (async_mpt_ops , created_chat , short_uuid ):
2929 service = async_mpt_ops .helpdesk .chats
3030 new_description = f"e2e update { short_uuid } "
3131
32- result = await service .update (chat_id , {"description" : new_description })
32+ result = await service .update (created_chat . id , {"description" : new_description })
3333
34- assert result .id == chat_id
34+ assert result .id == created_chat . id
3535 assert result .to_dict ().get ("description" ) == new_description
3636
3737
Original file line number Diff line number Diff line change 88pytestmark = [pytest .mark .flaky ]
99
1010
11- def test_get_chat (mpt_ops , chat_id ):
11+ def test_get_chat (mpt_ops , created_chat ):
1212 service = mpt_ops .helpdesk .chats
1313
14- result = service .get (chat_id )
14+ result = service .get (created_chat . id )
1515
16- assert result .id == chat_id
16+ assert result .id == created_chat . id
1717
1818
1919def test_list_chats (mpt_ops ):
@@ -25,13 +25,13 @@ def test_list_chats(mpt_ops):
2525 assert all (isinstance (chat , Chat ) for chat in result )
2626
2727
28- def test_update_chat (mpt_ops , chat_id , short_uuid ):
28+ def test_update_chat (mpt_ops , created_chat , short_uuid ):
2929 service = mpt_ops .helpdesk .chats
3030 new_description = f"e2e update { short_uuid } "
3131
32- result = service .update (chat_id , {"description" : new_description })
32+ result = service .update (created_chat . id , {"description" : new_description })
3333
34- assert result .id == chat_id
34+ assert result .id == created_chat . id
3535 assert result .to_dict ().get ("description" ) == new_description
3636
3737
You can’t perform that action at this time.
0 commit comments