Mock Form Post

Scooter slbentley at gmail.com
Tue May 19 22:40:33 CEST 2009


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.



More information about the Python-list mailing list