~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-02-24 09:51:04 UTC
  • Revision ID: grantw@unimelb.edu.au-20100224095104-nl3ndy0cysz2ioad
Add support for "really deep" (more than two segment) views.

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
 
             )
383
363
 
384
364
class TestGeneration(BaseTest):
385
365
    def setUp(self):