Split out the mock model support into its own file.
Review Request #9536 — Created Jan. 25, 2018 and submitted
mutations.py
has historically contained both the mutations and the
mock models that it creates for simulation. This led to an increasingly
large file. This change moves the mock model support out into its own
file, to help keep the code organized.There were a few small changes made to
MockMeta
in the process, just
for code cleanup. Some of the old functions that were later wrapped as
properties are now just property functions.setup_fields()
pulls
primary_key
out early, so that it's not checked repeatedly, and
shuffles some lines to help the code read better. Otherwise, nothing has
really changed.
Unit tests pass.