Mock Form Post

Scooter slbentley at gmail.com
Tue May 19 17:02:30 EDT 2009


On May 19, 3:40 pm, Scooter <slbent... at gmail.com> wrote:
> Let me qualify this by saying I'm very new to python. I'm doing some
> work with mod_python and in a function I have defined I am passing in
> the form and then iterating through the form keys. I'm currently
> writing my unit tests and I'm trying to mock up a form object with
> kids so I can emulate my true form post. So I'm attempting to mock up
> a class that I'm calling "_Fakeform".  I'm lost on how I should do it
> though. I thought by creating a dictionary object with key value pairs
> that would satisfy my need but I'm not sure how to get at it when I
> pass my mocked class in.

1 strike against me for poor proof reading.
1) While I did mention mod_python I didn't say I was referring to an
HTML form.
2) I said I'm trying to mock up a form object with "kids". No idea how
I messed that up, but it should be "keys"



More information about the Python-list mailing list