From 653dad51df55e0ad35e28bd7a32aefce2f75e7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20Poyatos?= Date: Mon, 23 Dec 2024 12:42:42 +0100 Subject: [PATCH] test: fix unit test --- .../tests/integration/test_authentication.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/api/src/backend/api/tests/integration/test_authentication.py b/api/src/backend/api/tests/integration/test_authentication.py index 2b09f05497f..e751cd06dc2 100644 --- a/api/src/backend/api/tests/integration/test_authentication.py +++ b/api/src/backend/api/tests/integration/test_authentication.py @@ -1,7 +1,8 @@ +from unittest.mock import patch + import pytest from conftest import TEST_PASSWORD, get_api_tokens, get_authorization_header from django.urls import reverse -from unittest.mock import patch from rest_framework.test import APIClient @@ -100,11 +101,9 @@ def test_refresh_token(create_test_user, tenants_fixture): @pytest.mark.django_db -def test_user_me_when_inviting_users(create_test_user, tenants_fixture, roles_fixture): +def test_user_me_when_inviting_users(create_test_user, tenants_fixture): client = APIClient() - role = roles_fixture[0] - user1_email = "user1@testing.com" user2_email = "user2@testing.com" @@ -135,16 +134,6 @@ def test_user_me_when_inviting_users(create_test_user, tenants_fixture, roles_fi "data": { "type": "invitations", "attributes": {"email": user2_email}, - "relationships": { - "roles": { - "data": [ - { - "type": "roles", - "id": str(role.id), - } - ] - } - }, } }, format="vnd.api+json",