From 006d9d739fe78d30c82fa82f987ec05380635b3f Mon Sep 17 00:00:00 2001 From: Lukas Plank Date: Tue, 3 Dec 2024 15:54:29 +0100 Subject: [PATCH] test: adapt tests to rdfproxy.ConfigDict --- tests/data/models/author_array_collection_model.py | 3 ++- tests/data/models/author_work_title_model.py | 3 ++- tests/data/models/dummy_model.py | 3 ++- tests/data/models/grouping_model.py | 3 ++- tests/data/models/nested_grouping_model.py | 3 ++- .../parameters/model_bindings_mapper_model_bool_parameters.py | 3 ++- tests/tests_adapter/test_adapter_grouped_pagination.py | 4 ++-- tests/tests_mapper/test_sad_path_mapper_grouped_models.py | 4 ++-- 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/data/models/author_array_collection_model.py b/tests/data/models/author_array_collection_model.py index 131a957..cebf19e 100644 --- a/tests/data/models/author_array_collection_model.py +++ b/tests/data/models/author_array_collection_model.py @@ -1,6 +1,7 @@ from typing import Annotated -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel +from rdfproxy import ConfigDict from rdfproxy.utils._types import SPARQLBinding diff --git a/tests/data/models/author_work_title_model.py b/tests/data/models/author_work_title_model.py index f934314..114bb86 100644 --- a/tests/data/models/author_work_title_model.py +++ b/tests/data/models/author_work_title_model.py @@ -2,7 +2,8 @@ from typing import Annotated -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel +from rdfproxy import ConfigDict from rdfproxy.utils._types import SPARQLBinding diff --git a/tests/data/models/dummy_model.py b/tests/data/models/dummy_model.py index 2cab0d9..7401d1d 100644 --- a/tests/data/models/dummy_model.py +++ b/tests/data/models/dummy_model.py @@ -1,6 +1,7 @@ """Simple dummy models e.g. for count query constructor testing.""" -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel +from rdfproxy import ConfigDict class Dummy(BaseModel): diff --git a/tests/data/models/grouping_model.py b/tests/data/models/grouping_model.py index 9289f92..c8190c1 100644 --- a/tests/data/models/grouping_model.py +++ b/tests/data/models/grouping_model.py @@ -1,6 +1,7 @@ """Grouping model for RDFProxy testing.""" -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel +from rdfproxy import ConfigDict class GroupingSimpleModel(BaseModel): diff --git a/tests/data/models/nested_grouping_model.py b/tests/data/models/nested_grouping_model.py index 89fd0d3..9e13816 100644 --- a/tests/data/models/nested_grouping_model.py +++ b/tests/data/models/nested_grouping_model.py @@ -1,6 +1,7 @@ """Nested grouping model for RDFProxy testing.""" -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel +from rdfproxy import ConfigDict class NestedGroupingSimpleModel(BaseModel): diff --git a/tests/data/parameters/model_bindings_mapper_model_bool_parameters.py b/tests/data/parameters/model_bindings_mapper_model_bool_parameters.py index 2b31d5a..5721292 100644 --- a/tests/data/parameters/model_bindings_mapper_model_bool_parameters.py +++ b/tests/data/parameters/model_bindings_mapper_model_bool_parameters.py @@ -3,7 +3,8 @@ The test cover all cases discussed in https://github.com/acdh-oeaw/rdfproxy/issues/110. """ -from pydantic import BaseModel, ConfigDict, Field, create_model +from pydantic import BaseModel, Field, create_model +from rdfproxy import ConfigDict from tests.utils._types import ModelBindingsMapperParameter diff --git a/tests/tests_adapter/test_adapter_grouped_pagination.py b/tests/tests_adapter/test_adapter_grouped_pagination.py index ae444f7..e1bdb52 100644 --- a/tests/tests_adapter/test_adapter_grouped_pagination.py +++ b/tests/tests_adapter/test_adapter_grouped_pagination.py @@ -4,8 +4,8 @@ import pytest -from pydantic import BaseModel, ConfigDict -from rdfproxy import Page, QueryParameters, SPARQLModelAdapter +from pydantic import BaseModel +from rdfproxy import ConfigDict, Page, QueryParameters, SPARQLModelAdapter query = """ diff --git a/tests/tests_mapper/test_sad_path_mapper_grouped_models.py b/tests/tests_mapper/test_sad_path_mapper_grouped_models.py index 07f0e90..2a5beb5 100644 --- a/tests/tests_mapper/test_sad_path_mapper_grouped_models.py +++ b/tests/tests_mapper/test_sad_path_mapper_grouped_models.py @@ -1,6 +1,6 @@ -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel import pytest -from rdfproxy import ModelBindingsMapper +from rdfproxy import ConfigDict, ModelBindingsMapper from rdfproxy.utils._exceptions import ( InvalidGroupingKeyException, MissingModelConfigException,