Refs #18586 - Refactored model get_or_create test.

Refactored get_or_create test into several smaller test functions across two
different test classes. Also converted the comments over to docstrings.