~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/base/test/test_rest.py

  • Committer: William Grant
  • Date: 2010-07-03 11:03:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: grantw@unimelb.edu.au-20100703110310-tz76n9kb367wua3r
Use req.unparsed_uri instead of req.uri -- req.uri doesn't contain the query string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
238
238
    def testGETNamedOperation(self):
239
239
        req = FakeRequest()
240
240
        req.method = 'GET'
241
 
        req.uri = '/foo?' + urllib.urlencode({'ivle.op': 'say_something'})
 
241
        req.unparsed_uri = '/?' + urllib.urlencode(
 
242
            {'ivle.op': 'say_something'})
242
243
        view = JSONRESTViewTest(req, None)
243
244
        view.render(req)
244
245
        assert req.content_type == 'application/json'
247
248
    def testGETNamedOperationDoesNotFindWriteOperation(self):
248
249
        req = FakeRequest()
249
250
        req.method = 'GET'
250
 
        req.uri = '/foo?' + urllib.urlencode(
 
251
        req.unparsed_uri = '/?' + urllib.urlencode(
251
252
            {'ivle.op': 'do_stuff', 'what': 'something'})
252
253
        view = JSONRESTViewTest(req, None)
253
254
        try: