I'm aware of that. What I meant to say is that while assuming that "`allowed_len` will never be `None`" seems reasonable, this assumption isn't guaranteed to always hold, since there isn't any constraint in the code or even any test which asserts that whenever `supports_long_model_names` is set to `False`, `max_name_length` should be set to an integer value. Again, even though that is currently the case in the backends codebase.

IMHO, adding a test to assert that would be helpful, but if you're not interested in doing that, it would be enough to test that `allowed_len` isn't `None` in your tests before you use it, since good unittests make as few assumptions about the codebase as possible.