* 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
I think it might be helpful to add an explicit hint that HTTP headers should be prepended with `HTTP_` as required by `django.test.Client` (at least it was not super obvious to me when I tried to use it).
* 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
* Add a default msg to show the response content.
This seems like an issue with using assertResponseNoErrors and assertResponseHasErrors
Which doesn't include any errors specific to the response and currently just shows.
```python
self.assertNotIn("errors", list(content.keys()))
AssertionError: 'errors' unexpectedly found in ['errors', 'data']
```
* Update testing.py
* Add headers arg to GraphQLTestCase.query
* fix headers NoneType case in GraphQLTestCase.query
* Run format
Co-authored-by: Jonathan Kim <jkimbo@gmail.com>