예제 #1
0
 def test_get_pagelet_no_key(self):
     page = PageletPage(request=mock_data.mock_request, request_kwargs={}, page=mock_page_model)
     pagelet = page.get_pagelet()
     self.assertIsInstance(pagelet, BasePagelet, 'pagelet was not a Pagelet %s' % pagelet)
예제 #2
0
 def test_get_pagelet_not_found(self):
     page = PageletPage(request=mock_data.mock_request, request_kwargs={}, page=mock_page_model)
     pagelet = page.get_pagelet('test')
     self.assertIsNone(pagelet, 'pagelet was not none %s' % pagelet)
예제 #3
0
 def test_get_pagelet(self):
     page = PageletPage(request=mock_data.mock_request, request_kwargs={}, page=mock_page_model)
     pagelet = page.get_pagelet(mock_pagelet_model_2.name)
     self.assertIs(pagelet._data_model, mock_pagelet_model_2, 'got incorrect pagelet %s' % pagelet)