From e9baf609cf0a8d697220b90780630f164f4c8dbe Mon Sep 17 00:00:00 2001 From: Sebastian Hernandez Date: Wed, 24 Feb 2021 15:27:13 +0100 Subject: [PATCH] Fix main branch tests failing due to wrong instancing of Missing class --- graphene_django/compat.py | 3 ++- graphene_django/filter/tests/test_array_field_exact_filter.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/graphene_django/compat.py b/graphene_django/compat.py index 537fd1da3..195678610 100644 --- a/graphene_django/compat.py +++ b/graphene_django/compat.py @@ -1,5 +1,6 @@ class MissingType(object): - pass + def __init__(self, *args, **kwargs): + pass try: diff --git a/graphene_django/filter/tests/test_array_field_exact_filter.py b/graphene_django/filter/tests/test_array_field_exact_filter.py index b07abede5..cd72868c9 100644 --- a/graphene_django/filter/tests/test_array_field_exact_filter.py +++ b/graphene_django/filter/tests/test_array_field_exact_filter.py @@ -81,6 +81,7 @@ def test_array_field_exact_empty_list(Query): ] +@pytest.mark.skipif(ArrayField is MissingType, reason="ArrayField should exist") def test_array_field_filter_schema_type(Query): """ Check that the type in the filter is an array field like on the object type.