I am currently trying to run some tests on a RESTful web service and use the django test client to test the following get request using Client.get:
'/api/browse=ia?filter=General'
These are my urls:
(r'^api/browse=([\w\s]+)$', 'webservice_browse_nofilter')
(r'^api/browse=([\w\s]+)\?filter=(\w+)$', 'webservice_browse')
The problem is that the wrong function is called. In this case I want to call the second function but instead the first is called. The problem is that the ? should act as a separator of the arguments but gets matched by the first pattern which still sends the correct argument 'ia' to the function instead of the whole string. I feel like I am missing something but I do not know what. The intent is to call the second function with arguments 'ia' and 'General'.