From fe66b48d38a01e6a3acd8f870a6b5bc4e49381fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Sastoque=20H?= Date: Tue, 2 Mar 2021 19:46:35 +0100 Subject: [PATCH] Fix main branch tests failing due to wrong instancing of Missing class (#1135) Co-authored-by: Sebastian Hernandez --- 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 537fd1d..1956786 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 b07abed..cd72868 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.