From 890f0e7d2640c5b9135028683eaf5f4f27baa468 Mon Sep 17 00:00:00 2001 From: Lukas Plank Date: Tue, 3 Dec 2024 11:07:04 +0100 Subject: [PATCH] test: 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 d1d7a3f..3158f93 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 d69eb2f..e3c1cbc 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 35d21a0..9b86d95 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 +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 8b88bfa..deda992 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 +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 b4a54d8..fe23e6a 100644 --- a/tests/tests_mapper/test_sad_path_mapper_grouped_models.py +++ b/tests/tests_mapper/test_sad_path_mapper_grouped_models.py @@ -1,7 +1,7 @@ import pytest -from pydantic import BaseModel, ConfigDict -from rdfproxy import ModelBindingsMapper +from pydantic import BaseModel +from rdfproxy import ConfigDict, ModelBindingsMapper from rdfproxy.utils._exceptions import ( MissingModelConfigException, UnboundGroupingKeyException,