Skip to content

Commit

Permalink
test: adapt tests to rdfproxy.ConfigDict
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-pl committed Dec 3, 2024
1 parent d6667cd commit 006d9d7
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion tests/data/models/author_array_collection_model.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
3 changes: 2 additions & 1 deletion tests/data/models/author_work_title_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 2 additions & 1 deletion tests/data/models/dummy_model.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion tests/data/models/grouping_model.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion tests/data/models/nested_grouping_model.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions tests/tests_adapter/test_adapter_grouped_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_mapper/test_sad_path_mapper_grouped_models.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 006d9d7

Please sign in to comment.