diff --git a/poetry.lock b/poetry.lock index b0057171..cbff9e43 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "adit-radis-shared" @@ -36,8 +36,8 @@ whitenoise = "^6.0.0" [package.source] type = "git" url = "https://github.com/openradx/adit-radis-shared.git" -reference = "0.9.6" -resolved_reference = "cbc4943c7a5dfce2eb02ef91d842677f8f5a6699" +reference = "0.11.0" +resolved_reference = "c0615600a8bab511aa0ce22baa3e6ba11be0ad8d" [[package]] name = "adrf" @@ -3779,4 +3779,4 @@ testing = ["coverage[toml]", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = ">=3.12,<4.0" -content-hash = "91975e9dacd1cae076eca121f858d61f740d7076f63dfd3167dd87c5bcc65bf2" +content-hash = "8faad97ea881b31e4f75dcece411fff9f891f23f33e0ec518e4fbfe1bc880bfb" diff --git a/pyproject.toml b/pyproject.toml index ae208e24..730de165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "AGPL-3.0-or-later" readme = "README.md" [tool.poetry.dependencies] -adit-radis-shared = { git = "https://github.com/openradx/adit-radis-shared.git", tag = "0.9.6" } +adit-radis-shared = { git = "https://github.com/openradx/adit-radis-shared.git", tag = "0.11.0" } adrf = "^0.1.4" aiofiles = "^24.1.0" asyncinotify = "^4.0.1" diff --git a/radis/rag/tests/unit/test_processors.py b/radis/rag/tests/unit/test_processors.py index 43dda93f..bfd5d212 100644 --- a/radis/rag/tests/unit/test_processors.py +++ b/radis/rag/tests/unit/test_processors.py @@ -2,6 +2,7 @@ import pytest from django.db import close_old_connections +from pytest_mock import MockerFixture from radis.chats.utils.testing_helpers import create_async_openai_client_mock from radis.rag.models import Answer, RagInstance @@ -10,7 +11,7 @@ @pytest.mark.django_db(transaction=True) -def test_rag_task_processor(mocker): +def test_rag_task_processor(mocker: MockerFixture): num_rag_instances = 5 num_questions = 5 rag_task = create_rag_task( diff --git a/radis/rag/utils/testing_helpers.py b/radis/rag/utils/testing_helpers.py index bc324fc6..5d1ade6c 100644 --- a/radis/rag/utils/testing_helpers.py +++ b/radis/rag/utils/testing_helpers.py @@ -1,6 +1,7 @@ from typing import Literal from adit_radis_shared.accounts.factories import GroupFactory, UserFactory +from adit_radis_shared.common.utils.testing_helpers import add_user_to_group from radis.rag.factories import QuestionFactory, RagInstanceFactory, RagJobFactory, RagTaskFactory from radis.rag.models import RagJob, RagTask @@ -15,10 +16,9 @@ def create_rag_task( ) -> RagTask: language = LanguageFactory.create(code=language_code) - # TODO: activate group - group = GroupFactory() user = UserFactory() - user.groups.add(group) + group = GroupFactory() + add_user_to_group(user, group) job = RagJobFactory.create( status=RagJob.Status.PENDING, owner_id=user.id,