* 👽 Use .formatted instead of format_error
* ✅ Fix test with newer graphene
null default values (graphql-python/graphene@03277a5)
no more trailing newlines
* Added GraphQLTransactionTestCase
- Adds support for testing code that is executed within a transaction
Reference: https://docs.djangoproject.com/en/3.1/topics/testing/tools/#django.test.TransactionTestCase
```
For instance, you cannot test that a block of code is executing within a transaction, as is required when using select_for_update(). In those cases, you should use TransactionTestCase.
```
* Update testing.py
* Update testing.py
* Fixed formatting.
* Updated docs.
* Updated test.
* Update testing.rst
* - Add filtering support for choice fields converted to graphql Enum (or not)
- Fix type of various filters (used to default to String)
- Fix bug with contains introduced in previous PR
- Fix bug with declared filters being overridden (see PR #1108)
- Fix support for ArrayField and add documentation
* Fix for v3
Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
* Use the Django Client test utility instance that Django provides with its TestCase class. This allows GraphQL tests to make use of the stateful client methods like login()
* Add missing test case initializer call
* Don't break backward compability
* Add test for pending deprecation warning on GraphQLTestCase._client
Co-authored-by: Tom Nightingale <tom@tnightingale.com>
* merge master into v3
* fix order_by snake casing by checking if value is None, switch executor to execution_context_class since schema.execute no longer supports executor
* fix linting by removing duplicate defintion and test of convert_form_field_to_string_list
* Handle Django database atomic requests
* Create and handle database atomic mutations
* Make code compatible with Python 2.7
* Code style
* Define set_rollback instead of using the one in rest_framework.views because of backward compatibility
* Implement mock.patch.dict
* fix( DjangoListField ): test that default functionality should resolve/call queryset at view time, first attempt at solution
* fix( DjangoListField ): DjangoListField defines get_manager just like DjangoConnectionField for a better variable name default_manager instead of default_queryset
* fix: apply specific black formatting
* Reset the global registry after each test (teardown)
* Create a settings fixtures that returns graphene_settings and resets
the graphene_settings after use (teardown)
* Convert test_mutation tests from unittests.TestCase to pytest
* Convert test_mutation PetType to a pet_type fixtures that reregisters
the type
* Remove Python 2 support
* Upgrade Python & Django versions
* Remove unsupported Django versions
* Remove unsupported Python versions
* Add Python 3.8
* Drop support for django-filter < 2
* Update LoginRequiredMixin doc link
* Remove redundant import
* Resolve RemovedInDjango40Warning warnings
* gql/graphene-django/graphene_django/tests/test_converter.py:175:
RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is
deprecated in favor of django.utils.translation.gettext_lazy().
* graphene-django/graphene_django/utils/utils.py:28:
RemovedInDjango40Warning: force_text() is deprecated in favor of
force_str().
* No need to use unicode strings with Python3
* Remove singledispatch dependency
singledispatch is inluded with Python >= 3.4, no need for external
package.
* Add new setting to create unique enum names
* Add specific tests for name generation
* Add schema test
* Rename settings field
* Rename setting
* Add custom function setting
* Add documentation
* Use format instead of f strings
* Update graphene_django/converter.py
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
* Fix tests
* Update docs
* Import function through import_string function
Co-authored-by: Syrus Akbary <me@syrusakbary.com>