@@ -413,7 +413,7 @@ async def test_maintainer_plus_can_create_queues_with_the_same_name_but_diff_gro
413413 group_user = group .get_member_of_role (role_maintainer_plus )
414414
415415 # Act
416- await client .post (
416+ queue_1 = await client .post (
417417 "v1/queues" ,
418418 headers = {"Authorization" : f"Bearer { mock_group_user .token } " },
419419 json = {
@@ -422,7 +422,7 @@ async def test_maintainer_plus_can_create_queues_with_the_same_name_but_diff_gro
422422 "group_id" : mock_group .group .id ,
423423 },
424424 )
425- result = await client .post (
425+ queue_2 = await client .post (
426426 "v1/queues" ,
427427 headers = {"Authorization" : f"Bearer { group_user .token } " },
428428 json = {
@@ -431,13 +431,24 @@ async def test_maintainer_plus_can_create_queues_with_the_same_name_but_diff_gro
431431 "group_id" : group .group .id ,
432432 },
433433 )
434+ queue_1_json = queue_1 .json ()
435+ queue_2_json = queue_2 .json ()
434436
435437 # Assert
436- assert result .status_code == 200
437- assert result .json () == {
438- "id" : result .json ()["id" ],
438+ assert queue_1 .status_code == 200
439+ assert queue_1_json == {
440+ "id" : queue_1_json ["id" ],
441+ "name" : "New_queue" ,
442+ "description" : "Some interesting description" ,
443+ "group_id" : mock_group .group .id ,
444+ "slug" : f"{ mock_group .group .id } -New_queue" ,
445+ }
446+ assert queue_2 .status_code == 200
447+ assert queue_2_json == {
448+ "id" : queue_2_json ["id" ],
439449 "name" : "New_queue" ,
440450 "description" : "Some interesting description" ,
441451 "group_id" : group .group .id ,
442452 "slug" : f"{ group .group .id } -New_queue" ,
443453 }
454+ assert queue_1_json ["slug" ] != queue_2_json ["slug" ]
0 commit comments