Refactored the purge tests slightly to work better when there are dependencies between models.