To support a MockUser you could even do something like:

    user = isinstance(user, MockUser) and user or self.testsetup.credentials.get(user, PersonaTestUser().create_user())