you could rewrite

    self.app.addonuser_set.create(user=self.user, role=amo.AUTHOR_ROLE_VIEWER)

as

    self.app.addonuser_set.create(user_id=999, role=amo.AUTHOR_ROLE_VIEWER)