mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-14 06:04:23 +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
|
||||
)
|
||||
|
||||
assert (
|
||||
"""type Query {
|
||||
allReporters(offset: Int, before: String, after: String, first: Int, last: Int): ReporterTypeConnection
|
||||
allArticles(offset: Int, before: String, after: String, first: Int, last: Int, lang: ArticleLang, lang_In: [ArticleLang], reporter_AChoice: ReporterAChoice, reporter_AChoice_In: [ReporterAChoice]): ArticleTypeConnection
|
||||
}"""
|
||||
in schema_str
|
||||
)
|
||||
filters = {
|
||||
"offset": "Int",
|
||||
"before": "String",
|
||||
"after": "String",
|
||||
"first": "Int",
|
||||
"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