minor: use `dedent` with `test_custom_user_model`

Also: sort imports, PEP8 fixes.

/cc @Stranger6667: just to make you aware of `dedent`.
I think we should do dedent on this string in the django_testdir fixture instead, then we can just pass any string to the mark and have it picked up correctly.