def METHOD_NAME(user, journal=None, repository=None):
    request = Mock(HttpRequest)
    request.GET = Mock()
    request.user = user
    request.FILES = None
    request.META = {}
    request.META = {'REMOTE_ADDR': '127.0.0.1'}
    request.model_content_type = None
    if journal:
        request.journal = journal
        request.site_type = journal
        request.press = journal.press
        request.repository = None
    elif repository:
        request.repository = repository
        request.site_type = repository
        request.press = repository.press
        request.journal = None
    return request