Qinsi Zhu wrote: > Hi list, > > I'm new to pylons and had some trouble when doing unit tests with a > restcontroller. > > I created a restcontroller with "paster restcontroller" and began > writing functional tests for it. The tests run well with 'create', > 'new', 'show' and 'edit' methods, but failed with 'update' and > 'delete' methods, since I could only use self.app.post() and > self.app.get() methods in the tests. I had also tried to submit() a > form with hidden "_method" field or post() a request with a '_method' > in the params dict, but no luck. So I'd like to know the correct way > to test RESTful methods accepting HTTP methods like PUT and DELETE. > Sorry if it's a noob question.
If you upgrade to the newest Paste (1.4) there are put and delete methods for testing. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org : Write code, do good : http://topp.openplans.org/careers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
