Skip to content

Commit 3fe179c

Browse files
committed
feat(tests): add sync and async E2E tests for notification categories
1 parent 34f41a9 commit 3fe179c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tests/e2e/notifications/categories/test_async_categories.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ async def async_created_category(async_mpt_ops, category_data):
1717
print(f"TEARDOWN - Unable to delete category {category.id}: {error.title}") # noqa: WPS421
1818

1919

20-
def test_create_category(async_created_category, category_data):
21-
async_created_category.name == category_data["name"]
22-
async_created_category.description == category_data["description"]
20+
def test_create_category(async_created_category, category_data): # noqa: AAA01
21+
assert async_created_category.name == category_data["name"]
22+
assert async_created_category.description == category_data["description"]
2323

2424

2525
async def test_get_category(async_mpt_vendor, async_created_category):
@@ -97,7 +97,8 @@ async def test_delete_category(async_mpt_ops, async_created_category):
9797

9898
await service.delete(async_created_category.id)
9999

100-
await service.get(async_created_category.id)
100+
with pytest.raises(MPTAPIError):
101+
await service.get(async_created_category.id)
101102

102103

103104
async def test_delete_category_not_found(async_mpt_ops, invalid_category_id):

tests/e2e/notifications/categories/test_sync_categories.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def test_delete_category(mpt_ops, created_category):
9494

9595
service.delete(created_category.id) # act
9696

97-
service.get(created_category.id)
97+
with pytest.raises(MPTAPIError):
98+
service.get(created_category.id)
9899

99100

100101
def test_delete_category_not_found(mpt_ops, invalid_category_id):

0 commit comments

Comments
 (0)