Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(tests): refactor test folder structure #109

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/data/models/dummy_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Simple dummy models e.g. for count query constructor testing."""

from pydantic import BaseModel, ConfigDict


class Dummy(BaseModel):
pass


class GroupedDummy(BaseModel):
model_config = ConfigDict(group_by="x")
87 changes: 0 additions & 87 deletions tests/data/parameters/author_array_collection_model_parameters.py

This file was deleted.

28 changes: 0 additions & 28 deletions tests/data/parameters/author_work_title_model_parameters.py

This file was deleted.

49 changes: 0 additions & 49 deletions tests/data/parameters/basic_model_parameters.py

This file was deleted.

94 changes: 94 additions & 0 deletions tests/data/parameters/count_query_parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
from tests.data.models.dummy_model import Dummy, GroupedDummy
from tests.utils._types import CountQueryParameter


construct_count_query_parameters = [
CountQueryParameter(
query="""
select ?x ?y ?z
where {
values (?x ?y ?z) {
(1 2 3)
(1 22 33)
(2 222 333)
}
}
""",
model=Dummy,
expected=3,
),
CountQueryParameter(
query="""
select ?x ?y ?z
where {
values (?x ?y ?z) {
(1 2 3)
(1 22 33)
(2 222 333)
}
}
""",
model=GroupedDummy,
expected=2,
),
CountQueryParameter(
query="""
select ?x ?y ?z
where {
values (?x ?y ?z) {
(1 2 3)
(1 22 33)
(1 22 33)
(2 222 333)
}
}
""",
model=Dummy,
expected=4,
),
CountQueryParameter(
query="""
select ?x ?y ?z
where {
values (?x ?y ?z) {
(1 2 3)
(1 22 33)
(1 22 33)
(2 222 333)
}
}
""",
model=GroupedDummy,
expected=2,
),
CountQueryParameter(
query="""
select ?x ?y ?z
where {
values (?x ?y ?z) {
(1 2 3)
(1 22 33)
(2 222 333)
(2 222 333)
}
}
""",
model=Dummy,
expected=4,
),
CountQueryParameter(
query="""
select ?x ?y ?z
where {
values (?x ?y ?z) {
(1 2 3)
(1 22 33)
(2 222 333)
(2 222 333)
}
}
""",
model=GroupedDummy,
expected=2,
),
]
42 changes: 0 additions & 42 deletions tests/data/parameters/grouping_model_parameters.py

This file was deleted.

Loading
Loading