Skip to content

Commit 852ef93

Browse files
author
Lukasz Kawka
committed
fix: avoid reliance on notification order
1 parent 6b6cc9c commit 852ef93

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/e2e/push_notifications/notifications_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import Annotated
44

5-
from fastapi import FastAPI, Path, Request, HTTPException
5+
from fastapi import FastAPI, HTTPException, Path, Request
66

77

88
def create_notifications_app() -> FastAPI:

tests/e2e/push_notifications/test_default_push_notification_support.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ async def test_notification_triggering_with_in_message_config_e2e(
123123
f'{notifications_server}/tasks/{task_id}/notifications',
124124
n=2,
125125
)
126-
assert notifications[0]['status']['state'] == 'submitted'
127-
assert notifications[1]['status']['state'] == 'completed'
126+
states = [notification['status']['state'] for notification in notifications]
127+
assert 'completed' in states
128+
assert 'submitted' in states
128129

129130

130131
@pytest.mark.asyncio

0 commit comments

Comments
 (0)