OK, this locale is possibly not assigned in some cases. I think you need to initialize `locale` to `None` and then see if tests pass.