* Corrected enum metaclass to fix pickle.dumps()
* considered case with colliding class names (try to distinguish by file name)
* reverted simple solution back (without attempt to support duplicate Enum class names)
---------
Co-authored-by: sgrekov <sgrekov@lohika.com>
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
* Changed InputObjectType's default builder-from-dict argument to be `Undefined` instead of `None`, removing ambiguity of undefined optional inputs using dot notation access syntax.
* Move `set_default_input_object_type_to_undefined()` fixture into conftest.py for sharing it between multiple test files.
* Default enum description to "An enumeration."
default to this string, which is used in many tests, is causing
* Use the docstring descriptions of enums when they are present
* Added tests
* chore: add missing newline
* Fix new line
---------
Co-authored-by: Erik Wrede <erikwrede@users.noreply.github.com>
Previously, installing graphene and trying to do `from graphene.test import Client`
as recommended in the docs caused an `ImportError`, as the 'promise' library
is imported but only listed as a requirement in the 'test' section of the setup.py
file.
* Vendor DataLoader from aiodataloader and also move get_event_loop behavior from `__init__` to a property which only gets resolved when actually needed (this will solve PyTest-related to early get_event_loop() issues)
* Added DataLoader's specific tests
* plug `loop` parameter into `self._loop`, so that we still have the ability to pass in a custom event loop, if needed.
Co-authored-by: Erik Wrede <erikwrede2@gmail.com>
Providing an invalid value to an input type will now provoke an exception.
For example if the input as the type `UUID` and that you provide the value `2` it will now fail.
assert bar_graphql_type.interfaces == [foo_graphql_type] failed only on tox, because .interfaces was a tuple instead of a list. Error didn't occur using just pytest. Fixed by explicitly
converting both to list.