Thanks for the reply. Indeed, HTTP 202 isn't a redirect, but quite a few APIs use it as a "work in progress" indicator with a Location header to point to the resource to be created. This isn't a standard, just something I found in the wild a fair few times. One documented instance I stumbled across recently is on the
Azure architecture cloud design patterns page but I can dig out more if required.
Regarding the point of subclassing the test client, that's exactly what I'd like to do. I'm not suggesting to add HTTP 202 as a default redirectable status code as this would likely break existing tests but instead to make it easier to subclass the test client by moving the list of status codes that the test client redirects to a class-level property. The list of redirectable status codes is currently hidden in the implementation of the `_handle_redirects` method so I'd need to override the entire method which is a lot of code to copy and likely will be brittle as it's a private method so there can be no expectation of continuity across releases. Moving the list of redirectable status codes to a class-level property would make it easier to customize the redirect behavior with a simple subclass like this:
```py
from django.test import Client
class MyCustomRedirectTestClient(Client):
# this property customizes the redirect behavior:
# instead of redirecting on HTTP 301/302/303/307/308
# this client will only follow redirects on HTTP 202
redirect_status_codes = (202, )
```
Hope this makes my suggestion clearer. Let me know what you think!