def METHOD_NAME(self, name, account_type, role, owner, application_type, raises=None, returns=None, auth_reason=None):
    # set up the objects
    application = None
    if application_type == "exists":
        application = Suggestion(**ApplicationFixtureFactory.make_application_source())
    account = None
    if account_type == "exists":
        if role == "none":
            account = Account(**AccountFixtureFactory.make_publisher_source())
            account.remove_role("publisher")
        elif role == "publisher":
            account = Account(**AccountFixtureFactory.make_publisher_source())
        elif role == "admin":
            account = Account(**AccountFixtureFactory.make_managing_editor_source())
        if owner == "yes":
            application.set_owner(account.id)
        elif application is not None:
            application.set_owner("randomowner")
    svc = DOAJ.authorisationService()
    if raises is not None and raises != "":
        exception = None
        with self.assertRaises(EXCEPTIONS[raises]):
            try:
                svc.can_view_application(account, application)
            except Exception as e:
                exception = e
                raise e
        if raises == "AuthoriseException":
            if auth_reason == "not_owner":
                assert exception.reason == exception.NOT_OWNER
            elif auth_reason == "wrong_role":
                assert exception.reason == exception.WRONG_ROLE
    elif returns is not None:
        expected = returns == "true"
        assert svc.can_view_application(account, application) is expected
    else:
        assert False, "Specify either raises or returns"