def test_get_absolute_url(self): page = BasePage(request=mock_data.mock_request, request_kwargs={}, page=mock_page_model) url = page.get_absolute_url() self.assertEqual(mock_get_absolute_url_return, url, 'url is incorrect %s' % url)
def test_get_html_data(self): page = BasePage(request=mock_data.mock_request, request_kwargs={}, page=mock_page_model) data = page._get_html_data() expected_data = {'url': mock_get_absolute_url_return, 'name': mock_page_model.name} self.assertDictEqual(expected_data, data, 'data was incorrect %s' % data)