Closed frankvdp closed 3 months ago
I have the same issue. Python 3.11. Django 4.2.2 The uuid type is not supported. if you pass
{
"id": self.user.pk,
"name": "Hello"
}
the json.dump return a UUID object is not a valid JSON. but into the version 2.2.1 everything works fine.
I've investigated the issue. I've created a pull request. Meanwhile downgrading to v2.2.1 also worked for me.
Any chance of addressing this and doing a release? I see no way of making test-plus work with python 3.12 currently
Just released this fix. Good call on the test format @KaczuH, I know I didn't know that dark corner of DRF settings even existed. Thanks!
Apologies for the delay in getting this merged. @andres-holvi does this fix 3.12 for you? I don't directly see how this didn't work with 3.12.
When creating a unit test for a GET request, providing query parameters as
data={"key": "value"}
, the latest version introduced a json.dumps on the dictionary, resulting in an error like: `venv/lib/python3.8/site-packages/django/utils/http.py:111: ValueError`
When pinning to version 2.2.1, this problem is no longer there.
It appears to be caused by the file
test_plus/test.py:381
kwargs["data"] = json.dumps(data) if data is not None else None