Skip to content

GRAPHQL_SCHEMA is not included in the docs' testing example #1020

Closed
@karmek-k

Description

@karmek-k

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • What is the current behavior?

I was following the docs' article on testing and noticed that the example code raises the following error:

AttributeError: Variable GRAPHQL_SCHEMA not defined in GraphQLTestCase.

Here is the code from docs.
Put it somewhere in a Django project with graphene-django installed and run python3 manage.py test.

  • What is the expected behavior?

The tests should pass.

  • What is the motivation / use case for changing the behavior?

It took me a while to investigate the problem. Hopefully this change may save others' time.

  • Please tell us about your environment:

    • Version: Python 3.8.3
    • Platform: Manjaro Linux with KDE Plasma
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)

The article should mention the GRAPHQL_SCHEMA property and how to set it properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions