minor: use `dedent` with `test_custom_user_model`

Also: sort imports, PEP8 fixes.

/cc @Stranger6667: just to make you aware of `dedent`.
You are right. It gets done for all files created through pytest's `_makefile`.