Thank you. On Monday, June 15, 2020 at 9:50:28 PM UTC+2, RjOllos wrote: > > > > On Monday, June 15, 2020 at 8:17:33 AM UTC-7, Ozgur Polat wrote: >> >> Hi All, >> >> I am trying to write some unittests for my application and I tries to >> create a moc request with post method. Get method works and returns >> something but I did not get anything from post method so I went inside the >> MocReuest method and could not find any 'POST' key word or anything about >> post method. Seems like this has been removed. Do you know how I can >> generate a POST request. Here is the code I tried which did not work: >> >> req = MockRequest(self.gr_api.env, method='POST', >> args={'create_report': 'create_report', >> 'form_token': 'a token', >> 'get_wiki_link': 'some link'}) >> > > > MockRequest inherits from trac.web.api.Request and will handle POST > methods. > > If you Grep the codebase you'll find many examples like: > > https://trac.edgewall.org/browser/tags/trac-1.4.1/trac/ticket/tests/report.py?marks=70,86,99#L69 > > - Ryan >
-- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/trac-dev/b1f13b7f-1900-43c7-9109-f8bc87ccb755o%40googlegroups.com.