'Build a test request'

def get_request(self, is_secure, http_referer):

    request = Mock()
    request.META = {'HTTP_REFERER': http_referer}
    request.is_secure = (lambda : is_secure)
    return request
