Re: While running unit tests the wrong parser is being used.

2019-12-11 Thread Carl Nobile
Actually I found the problem it wasn't related to the *Content-type* or the *Accept* headers. BTW--the *format='json'* argument generates the *Content-Type* header. The problem had to do with the fact that I rewrote the *ContentNegotiation* class and there was a bug in it. Thanks for your comment,

Re: While running unit tests the wrong parser is being used.

2019-12-09 Thread José Manuel Valdivia Romero
Hi Carl, I think you are using the wrong header in your request, try to use: "Content-Type": "application/json" Best Regards, José Valdivia Carl Nobile schrieb am Sa., 30. Nov. 2019, 19:15: > I'm trying to run my unit tests using JSON however I'm getting this error: > > {'detail': ErrorDetail

While running unit tests the wrong parser is being used.

2019-11-30 Thread Carl Nobile
I'm trying to run my unit tests using JSON however I'm getting this error: {'detail': ErrorDetail(string='XML parse error - not well-formed (invalid token): line 1, column 0', code='parse_error')} My settings are: REST_FRAMEWORK = { ... 'DEFAULT_PARSER_CLASSES': ( 'rest_framewo