mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 00:32:24 +03:00
fix: test for graphene PR https://github.com/graphql-python/graphene/pull/1412
This commit is contained in:
parent
c4aa139ff1
commit
ca555293a4
|
@ -120,10 +120,7 @@ def test_array_field_filter_schema_type(Query):
|
|||
"randomField": "[Boolean!]",
|
||||
}
|
||||
filters_str = ", ".join(
|
||||
[
|
||||
f"{filter_field}: {gql_type} = null"
|
||||
for filter_field, gql_type in filters.items()
|
||||
]
|
||||
[f"{filter_field}: {gql_type}" for filter_field, gql_type in filters.items()]
|
||||
)
|
||||
assert (
|
||||
f"type Query {{\n events({filters_str}): EventTypeConnection\n}}" in schema_str
|
||||
|
|
|
@ -152,9 +152,6 @@ def test_filter_enum_field_schema_type(schema):
|
|||
"reporter_AChoice_In": "[TestsReporterAChoiceChoices]",
|
||||
}
|
||||
filters_str = ", ".join(
|
||||
[
|
||||
f"{filter_field}: {gql_type} = null"
|
||||
for filter_field, gql_type in filters.items()
|
||||
]
|
||||
[f"{filter_field}: {gql_type}" for filter_field, gql_type in filters.items()]
|
||||
)
|
||||
assert f" allArticles({filters_str}): ArticleTypeConnection\n" in schema_str
|
||||
|
|
|
@ -1008,7 +1008,7 @@ def test_integer_field_filter_type():
|
|||
assert str(schema) == dedent(
|
||||
"""\
|
||||
type Query {
|
||||
pets(offset: Int = null, before: String = null, after: String = null, first: Int = null, last: Int = null, age: Int = null): PetTypeConnection
|
||||
pets(offset: Int, before: String, after: String, first: Int, last: Int, age: Int): PetTypeConnection
|
||||
}
|
||||
|
||||
type PetTypeConnection {
|
||||
|
@ -1077,7 +1077,7 @@ def test_other_filter_types():
|
|||
assert str(schema) == dedent(
|
||||
"""\
|
||||
type Query {
|
||||
pets(offset: Int = null, before: String = null, after: String = null, first: Int = null, last: Int = null, age: Int = null, age_Isnull: Boolean = null, age_Lt: Int = null): PetTypeConnection
|
||||
pets(offset: Int, before: String, after: String, first: Int, last: Int, age: Int, age_Isnull: Boolean, age_Lt: Int): PetTypeConnection
|
||||
}
|
||||
|
||||
type PetTypeConnection {
|
||||
|
|
|
@ -98,7 +98,7 @@ def test_typed_filter_schema(schema):
|
|||
)
|
||||
|
||||
for filter_field, gql_type in filters.items():
|
||||
assert "{}: {} = null".format(filter_field, gql_type) in all_articles_filters
|
||||
assert "{}: {}".format(filter_field, gql_type) in all_articles_filters
|
||||
|
||||
|
||||
def test_typed_filters_work(schema):
|
||||
|
|
|
@ -183,7 +183,7 @@ def test_schema_representation():
|
|||
pets: [Reporter!]!
|
||||
aChoice: TestsReporterAChoiceChoices
|
||||
reporterType: TestsReporterReporterTypeChoices
|
||||
articles(offset: Int = null, before: String = null, after: String = null, first: Int = null, last: Int = null): ArticleConnection!
|
||||
articles(offset: Int, before: String, after: String, first: Int, last: Int): ArticleConnection!
|
||||
}
|
||||
|
||||
\"""An enumeration.\"""
|
||||
|
|
3
setup.py
3
setup.py
|
@ -60,7 +60,8 @@ setup(
|
|||
keywords="api graphql protocol rest relay graphene",
|
||||
packages=find_packages(exclude=["tests", "examples", "examples.*"]),
|
||||
install_requires=[
|
||||
"graphene>=3.0,<4",
|
||||
# "graphene>=3.0,<4",
|
||||
"graphene @ git+https://github.com/loft-orbital/graphene.git@loft-v3-1.0#egg=graphene",
|
||||
"graphql-core>=3.1.0,<4",
|
||||
"graphql-relay>=3.1.1,<4",
|
||||
"Django>=2.2",
|
||||
|
|
Loading…
Reference in New Issue
Block a user