File tree Expand file tree Collapse file tree
tests/e2e/integration/categories Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 "notifications.category.id" : " NTC-6157-0397" ,
6868 "notifications.message.id" : " MSG-0000-6215-1019-0139" ,
6969 "notifications.subscriber.id" : " NTS-0829-7123-7123" ,
70+ "integration.category.id" : " CAT-0000-0000" ,
7071 "integration.extension.id" : " EXT-4401-0953"
7172}
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+
4+ @pytest .fixture
5+ def categories_service (mpt_ops ):
6+ return mpt_ops .integration .categories
7+
8+
9+ @pytest .fixture
10+ def async_categories_service (async_mpt_ops ):
11+ return async_mpt_ops .integration .categories
12+
13+
14+ @pytest .fixture (scope = "session" )
15+ def category_id (e2e_config ):
16+ return e2e_config ["integration.category.id" ]
17+
18+
19+ @pytest .fixture
20+ def category_data (short_uuid ):
21+ return {
22+ "name" : f"e2e - please delete { short_uuid } " ,
23+ "description" : "Created by automated E2E tests. Safe to delete." ,
24+ }
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ from tests .e2e .helper import assert_async_service_filter_with_iterate
4+
5+ pytestmark = [
6+ pytest .mark .flaky ,
7+ ]
8+
9+
10+ @pytest .mark .skip (reason = "creates real resources; run manually only" )
11+ async def test_async_create_category (async_categories_service , category_data ):
12+ result = await async_categories_service .create (category_data )
13+
14+ assert result .name == category_data ["name" ]
15+
16+
17+ async def test_async_filter_categories (async_categories_service , category_id ):
18+ await assert_async_service_filter_with_iterate (
19+ async_categories_service , category_id , None
20+ ) # act
21+
22+
23+ @pytest .mark .skip (reason = "modifies real resources; run manually only" )
24+ async def test_async_update_category (async_categories_service , category_id ):
25+ result = await async_categories_service .update (category_id , {"name" : "e2e updated" })
26+
27+ assert result .id == category_id
28+
29+
30+ @pytest .mark .skip (reason = "deletes real resources; run manually only" )
31+ async def test_async_delete_category (async_categories_service , category_id ):
32+ await async_categories_service .delete (category_id ) # act
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ from tests .e2e .helper import assert_service_filter_with_iterate
4+
5+ pytestmark = [
6+ pytest .mark .flaky ,
7+ ]
8+
9+
10+ @pytest .mark .skip (reason = "creates real resources; run manually only" )
11+ def test_create_category (categories_service , category_data ):
12+ result = categories_service .create (category_data )
13+
14+ assert result .name == category_data ["name" ]
15+
16+
17+ def test_filter_categories (categories_service , category_id ):
18+ assert_service_filter_with_iterate (categories_service , category_id , None ) # act
19+
20+
21+ @pytest .mark .skip (reason = "modifies real resources; run manually only" )
22+ def test_update_category (categories_service , category_id ):
23+ result = categories_service .update (category_id , {"name" : "e2e updated" })
24+
25+ assert result .id == category_id
26+
27+
28+ @pytest .mark .skip (reason = "deletes real resources; run manually only" )
29+ def test_delete_category (categories_service , category_id ):
30+ categories_service .delete (category_id ) # act
You can’t perform that action at this time.
0 commit comments