Added flatten kwarg to the testing mock

(Defaults to True).  This reflects the loaders ability to take in the same kwarg.