mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-03 03:43:28 +03:00
Fix flaky test
This commit is contained in:
parent
4cc7c84225
commit
dc6042c2bd
|
@ -135,10 +135,18 @@ def test_filter_enum_field_schema_type(schema):
|
||||||
in schema_str
|
in schema_str
|
||||||
)
|
)
|
||||||
|
|
||||||
assert (
|
filters = {
|
||||||
"""type Query {
|
"offset": "Int",
|
||||||
allReporters(offset: Int, before: String, after: String, first: Int, last: Int): ReporterTypeConnection
|
"before": "String",
|
||||||
allArticles(offset: Int, before: String, after: String, first: Int, last: Int, lang: ArticleLang, lang_In: [ArticleLang], reporter_AChoice: ReporterAChoice, reporter_AChoice_In: [ReporterAChoice]): ArticleTypeConnection
|
"after": "String",
|
||||||
}"""
|
"first": "Int",
|
||||||
in schema_str
|
"last": "Int",
|
||||||
)
|
"lang": "ArticleLang",
|
||||||
|
"lang_In": "[ArticleLang]",
|
||||||
|
"reporter_AChoice": "ReporterAChoice",
|
||||||
|
"reporter_AChoice_In": "[ReporterAChoice]",
|
||||||
|
}
|
||||||
|
|
||||||
|
all_articles_filters = schema_str.split(" allArticles(")[1].split("): ArticleTypeConnection\n")[0].split(", ")
|
||||||
|
for filter_field, gql_type in filters.items():
|
||||||
|
assert "{}: {}".format(filter_field, gql_type) in all_articles_filters
|
||||||
|
|
Loading…
Reference in New Issue
Block a user