Commit Graph

17 Commits

Author SHA1 Message Date
Ignacio Orlandini
8f63199a63
Handle database transactions (#1039)
* 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
2020-12-22 20:18:14 -08:00
Semyon Pupkov
cc3bd05472
Replace Unidecode package with text_unidecode package #1014 (#1060)
Closes #1014
2020-12-22 20:12:22 -08:00
Tonye Jack
4b7119d691
Add a default msg to show the response content. (#1064)
* 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
2020-11-27 15:52:42 -08:00
Roberto Barreda
8408c51bf9
fix variables key in body (#1050) 2020-10-26 09:09:49 +00:00
Ülgen Sarıkavak
26960359a2
Add msg params to testing class (#1032) 2020-08-26 15:58:48 +01:00
Nikolai Røed Kristiansen
2308965658
Extract query function from GraphQLTestCase making it possible to use in a pytest fixture (#1015) 2020-08-05 20:24:16 +01:00
Jonathan Kim
1bec8e44b7
Move to_const function from Graphene into Graphene-Django (#992) 2020-06-25 15:11:18 +01:00
Noelle Leigh
dc5c971498
Switch operation_name to operationName in GraphQLTestCase (#936)
* Add op_name test

* Replace "operation_name" with "operationName"

* Improve test comments

* Add method for Python 2.7
2020-04-19 21:11:33 +01:00
Chibuotu Amadi
b66a3f3479 Add headers arg to GraphQLTestCase.query (#827)
* Add headers arg to GraphQLTestCase.query

* fix headers NoneType case in GraphQLTestCase.query

* Run format

Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
2019-12-26 11:45:18 +00:00
Misha K
b085b5922a add Django 3.0 to the test matrix (#793)
* add Django 3.0 to the test matrix

* fix six imports
2019-10-18 11:38:59 +01:00
Talley Lambert
254e59c36f Adds variables arg to GraphQLTestCase.query (#699)
* add variables arg in GraphQLTestCase.query

* update GraphQLTestCase.query docstring and remove type check
2019-09-07 11:49:29 -07:00
Semyon Pupkov
224725039b Asserting status code before decoding json in assertResponseNoEr… (#708) 2019-07-11 20:32:07 +01:00
Konstantin Alekseev
e2e496f505 Apply camel case converter to field names in DRF errors (#514)
* Apply camel case converter to field names in DRF errors

* Implement recursive error camelize, add setting.
2019-06-25 09:40:29 +01:00
Emil Goldsmith Olesen
3cde872e28 Stop enforcing csrf checks in GraphQLTestCase (#658) 2019-06-09 16:30:48 -07:00
José Roberto Meza Cabrera
ce6e6dd6e1 Fixes O2O relations 2019-06-09 14:15:46 -05:00
José Roberto Meza Cabrera
67b21cb36f Revert "Drop old Django compatibility code"
This reverts commit 6acd917cf7.
2019-06-09 14:08:31 -05:00
Paul Hallett
2bf7e7f66d
Fix importing error for GraphQLTestCase 2019-05-08 22:45:28 +01:00