File: conftest.py

package info (click to toggle)
python-graphene 3.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,120 kB
  • sloc: python: 8,935; makefile: 214; sh: 18
file content (12 lines) | stat: -rw-r--r-- 418 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import pytest
from graphql import Undefined

from graphene.types.inputobjecttype import set_input_object_type_default_value


@pytest.fixture()
def set_default_input_object_type_to_undefined():
    """This fixture is used to change the default value of optional inputs in InputObjectTypes for specific tests"""
    set_input_object_type_default_value(Undefined)
    yield
    set_input_object_type_default_value(None)