Description
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.
- If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar (you can use this template as a starting point: https://repl.it/@jkimbo/Graphene-Django-Example).
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.