You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Trac Development
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'})
RjOllos
unread,
Jun 15, 2020, 3:50:28 PM6/15/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Trac Development
MockRequest inherits from trac.web.api.Request and will handle POST methods.
If you Grep the codebase you'll find many examples like: