adding unit tests for the "purge" module
fixing unit tests to work with a new model factory