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.
Merge pull request #2553 from liavkoren-vmfarms/ticket_18586

Ticket 18586