Skip to content

Commit ca55529

Browse files
author
Thomas Leonard
committed
fix: test for graphene PR graphql-python/graphene#1412
1 parent c4aa139 commit ca55529

File tree

6 files changed

+8
-13
lines changed

6 files changed

+8
-13
lines changed

graphene_django/filter/tests/test_array_field_exact_filter.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ def test_array_field_filter_schema_type(Query):
120120
"randomField": "[Boolean!]",
121121
}
122122
filters_str = ", ".join(
123-
[
124-
f"{filter_field}: {gql_type} = null"
125-
for filter_field, gql_type in filters.items()
126-
]
123+
[f"{filter_field}: {gql_type}" for filter_field, gql_type in filters.items()]
127124
)
128125
assert (
129126
f"type Query {{\n events({filters_str}): EventTypeConnection\n}}" in schema_str

graphene_django/filter/tests/test_enum_filtering.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ def test_filter_enum_field_schema_type(schema):
152152
"reporter_AChoice_In": "[TestsReporterAChoiceChoices]",
153153
}
154154
filters_str = ", ".join(
155-
[
156-
f"{filter_field}: {gql_type} = null"
157-
for filter_field, gql_type in filters.items()
158-
]
155+
[f"{filter_field}: {gql_type}" for filter_field, gql_type in filters.items()]
159156
)
160157
assert f" allArticles({filters_str}): ArticleTypeConnection\n" in schema_str

graphene_django/filter/tests/test_fields.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ class Query(ObjectType):
10081008
assert str(schema) == dedent(
10091009
"""\
10101010
type Query {
1011-
pets(offset: Int = null, before: String = null, after: String = null, first: Int = null, last: Int = null, age: Int = null): PetTypeConnection
1011+
pets(offset: Int, before: String, after: String, first: Int, last: Int, age: Int): PetTypeConnection
10121012
}
10131013
10141014
type PetTypeConnection {
@@ -1077,7 +1077,7 @@ class Query(ObjectType):
10771077
assert str(schema) == dedent(
10781078
"""\
10791079
type Query {
1080-
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
1080+
pets(offset: Int, before: String, after: String, first: Int, last: Int, age: Int, age_Isnull: Boolean, age_Lt: Int): PetTypeConnection
10811081
}
10821082
10831083
type PetTypeConnection {

graphene_django/filter/tests/test_typed_filter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_typed_filter_schema(schema):
9898
)
9999

100100
for filter_field, gql_type in filters.items():
101-
assert "{}: {} = null".format(filter_field, gql_type) in all_articles_filters
101+
assert "{}: {}".format(filter_field, gql_type) in all_articles_filters
102102

103103

104104
def test_typed_filters_work(schema):

graphene_django/tests/test_types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def test_schema_representation():
183183
pets: [Reporter!]!
184184
aChoice: TestsReporterAChoiceChoices
185185
reporterType: TestsReporterReporterTypeChoices
186-
articles(offset: Int = null, before: String = null, after: String = null, first: Int = null, last: Int = null): ArticleConnection!
186+
articles(offset: Int, before: String, after: String, first: Int, last: Int): ArticleConnection!
187187
}
188188
189189
\"""An enumeration.\"""

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
keywords="api graphql protocol rest relay graphene",
6161
packages=find_packages(exclude=["tests", "examples", "examples.*"]),
6262
install_requires=[
63-
"graphene>=3.0,<4",
63+
# "graphene>=3.0,<4",
64+
"graphene @ git+https://github.com/loft-orbital/[email protected]#egg=graphene",
6465
"graphql-core>=3.1.0,<4",
6566
"graphql-relay>=3.1.1,<4",
6667
"Django>=2.2",

0 commit comments

Comments
 (0)