You do this often enough that you should make a helper method, like `assert_response_status`. Also, you might consider just using the number `401` instead of importing status, as IMO using the constant from rest_framework doesn't add a lot, but others would probably disagree with me.