[plt-scheme] Web server dispatcher call wrapper

From: Rommel M. Martinez (ebzzry at gmail.com)
Date: Sat Nov 21 20:40:32 EST 2009

Thanks for the tip. I'll take a look at that.

On Sun, Nov 22, 2009 at 8:52 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> Also take a look at delirium to do end-to-end testing of the application itself.
>
> Jay
>
> On Sat, Nov 21, 2009 at 5:38 PM, Rommel M. Martinez <ebzzry at gmail.com> wrote:
>> Yes, I'm trying to write test cases.
>>
>> Ah yes. I also found the test cases in bindings-test.ss.
>>
>> On Sun, Nov 22, 2009 at 8:19 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>>> I don't understand.
>>>
>>> Are you trying to write test cases? And you want to make a fake
>>> 'request' object? You can just construct them manually based on the
>>> docs in the web-server/http collection.
>>>
>>> Jay
>>>
>>> On Sat, Nov 21, 2009 at 5:06 PM, Rommel M. Martinez <ebzzry at gmail.com> wrote:
>>>> Is there a way to wrap a call to a dispatcher so that it simulates an
>>>> HTTP POST request? For example, if `render-foo' is defined as:
>>>>
>>>> (define (render-foo request x y)
>>>>  (local [(define (response-generator make-url) ...)]
>>>>    (send/suspend/dispatch response-generator)))
>>>>
>>>> How can I call `render-foo' like this?
>>>>
>>>> (with-bindings
>>>>  [(x "foo")
>>>>   (y "bar")]
>>>>  (render-foo request))
>>>>
>>>>
>>>> --
>>>> Rommel M. Martinez
>>>> http://www.bespin.org/~ebzzry
>>>> _________________________________________________
>>>>  For list-related administrative tasks:
>>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>>
>>>
>>>
>>>
>>> --
>>> Jay McCarthy <jay at cs.byu.edu>
>>> Assistant Professor / Brigham Young University
>>> http://teammccarthy.org/jay
>>>
>>> "The glory of God is Intelligence" - D&C 93
>>>
>>
>>
>>
>> --
>> Rommel M. Martinez
>> http://www.bespin.org/~ebzzry
>>
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
>



-- 
Rommel M. Martinez
http://www.bespin.org/~ebzzry


Posted on the users mailing list.