コード例 #1
0
 def test_default_controller_url(self):
     self.assertEqual('/c',
                     url_for(controller='c'))
コード例 #2
0
 def test_home_named_route(self):
     self.assertEqual('/',
                      url_for('home'))
コード例 #3
0
 def test_default_controller_action_url(self):
     for action in ['edit', 'update', 'delete']:
         self.assertEqual('/c/1/%s' % action,
                          url_for(controller='c', action=action, id=1))
コード例 #4
0
 def test_default_controller_view_url(self):
     self.assertEqual('/c/1',
                      url_for(controller='c', action='view', id=1))
コード例 #5
0
 def test_default_controller_new_url(self):
     self.assertEqual('/c/new',
                      url_for(controller='c', action='new'))
コード例 #6
0
 def test_default_controller_index_url(self):
     self.assertEqual('/c',
                      url_for(controller='c', action='index'))