[1.8.x] Fixed "environment can only contain strings" in model_regress test on Windows.
[1.8.x] Fixed "environment can only contain strings" in model_regress test on Windows.

Backport of ad50b6c853f4a6c864219fbd38b4254ffaef7b1c from master

h4r5h1t/django-hauthy,h4r5h1t/django-hauthy,h4r5h1t/django-hauthy,pquentin/django,pquentin/django,h4r5h1t/django-hauthy,pquentin/django