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

« back to all changes in this revision

Viewing changes to ivle/webapp/publisher/test_publisher.py

  • Committer: William Grant
  • Date: 2010-07-28 05:06:15 UTC
  • Revision ID: grantw@unimelb.edu.au-20100728050615-uwbxn9frla3pdw8m
Encode content_type when downloading files. cjson made us write bad code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
        assert_equal(self.rtr.resolve('/~jsmith/foo/bar'),
361
361
             (self.r.users['jsmith'], UserServeView, ('foo', 'bar')))
362
362
 
 
363
    def testTrailingSlashResolvesToDefaultView(self):
 
364
        assert_equal(
 
365
             self.rtr.resolve('/info1/2009/1/'),
 
366
             (self.r.subjects['info1'].offerings[(2009, 1)],
 
367
              OfferingIndex, ())
 
368
             )
 
369
 
 
370
    def testTrailingSlashResolvesToDeepDefaultView(self):
 
371
        assert_equal(
 
372
             self.rtr.resolve('/info1/2009/1/+worksheets/+marks/'),
 
373
             (self.r.subjects['info1'].offerings[(2009, 1)],
 
374
              OfferingWorksheetMarks, ())
 
375
             )
 
376
 
 
377
    def testSubpathIndicatesTrailingSlash(self):
 
378
        assert_equal(
 
379
             self.rtr.resolve('/info1/2009/1/+index/'),
 
380
             (self.r.subjects['info1'].offerings[(2009, 1)],
 
381
              OfferingIndex, ('',))
 
382
             )
363
383
 
364
384
class TestGeneration(BaseTest):
365
385
    def setUp(self):