kopia lustrzana https://gitlab.com/marnanel/chapeau
TrilbyTestCase uses the "data" and "extra" params the same way as Django's test client
rodzic
a9d03dd280
commit
d4af44913b
|
@ -74,11 +74,11 @@ class TrilbyTestCase(TestCase):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def request(self, verb, path,
|
def request(self, verb, path,
|
||||||
data={},
|
data = None,
|
||||||
as_user=None,
|
as_user=None,
|
||||||
expect_result=200,
|
expect_result=200,
|
||||||
parse_result=True,
|
parse_result=True,
|
||||||
*args, **kwargs,
|
**extra,
|
||||||
):
|
):
|
||||||
|
|
||||||
c = APIClient()
|
c = APIClient()
|
||||||
|
@ -92,8 +92,7 @@ class TrilbyTestCase(TestCase):
|
||||||
path=path,
|
path=path,
|
||||||
data=data,
|
data=data,
|
||||||
format='json',
|
format='json',
|
||||||
*args,
|
extra=extra,
|
||||||
**kwargs,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if expect_result is not None:
|
if expect_result is not None:
|
||||||
|
|
Ładowanie…
Reference in New Issue