minor: use `dedent` with `test_custom_user_model`

Also: sort imports, PEP8 fixes.

/cc @Stranger6667: just to make you aware of `dedent`.