@@ -45,6 +45,9 @@ def _register_partner(self):
4545 with self ._create_test_client () as test_client , self .new_mails () as new_mails :
4646 response : Response = test_client .post (
4747 "/auth/register" ,
48+ headers = {
49+ "Content-Type" : "application/json" ,
50+ },
4851 content = json .dumps (
4952 {
5053 "name" : "Loriot" ,
@@ -59,6 +62,9 @@ def _register_partner(self):
5962 def _login (self , test_client , password = "supersecret" ):
6063 response : Response = test_client .post (
6164 "/auth/login" ,
65+ headers = {
66+ "Content-Type" : "application/json" ,
67+ },
6268 content = json .dumps (
6369 {
6470 "login" : "loriot@example.org" ,
@@ -105,6 +111,9 @@ def test_request_reset_password(self):
105111 with self ._create_test_client () as test_client , self .new_mails () as new_mails :
106112 response : Response = test_client .post (
107113 "/auth/request_reset_password" ,
114+ headers = {
115+ "Content-Type" : "application/json" ,
116+ },
108117 content = json .dumps ({"login" : "loriot@example.org" }),
109118 )
110119 self .assertEqual (response .status_code , status .HTTP_200_OK , response .text )
@@ -121,6 +130,9 @@ def test_request_reset_password(self):
121130 token = str (new_mails .body ).split ("token=" )[1 ].split ('">' )[0 ]
122131 response : Response = test_client .post (
123132 "/auth/set_password" ,
133+ headers = {
134+ "Content-Type" : "application/json" ,
135+ },
124136 content = json .dumps (
125137 {
126138 "password" : "megasecret" ,
@@ -155,6 +167,9 @@ def test_validate_email(self):
155167 with self ._create_test_client () as test_client :
156168 response : Response = test_client .post (
157169 "/auth/validate_email" ,
170+ headers = {
171+ "Content-Type" : "application/json" ,
172+ },
158173 content = json .dumps ({"token" : token }),
159174 )
160175 self .assertEqual (response .status_code , status .HTTP_200_OK , response .text )
0 commit comments