def test_node_view_with_basic(self): """ Test basic node Test node view of basic page, slash is missing (expecting redirect) Test node view of basic page properly :return: None """ response = assert_basic(self, 'about') self.assertRedirects(response, url_with_lang('/about/'), status_code=301) assert_basic(self, 'about/')
def test_node_view_with_basic_two_level(self): """ Test basic node, two levels in alias Test node view of basic page, slash is missing (expecting redirect) Test properly, slash is not missing :return: None """ create_basic('about/company') response = assert_basic(self, 'about/company') self.assertRedirects(response, url_with_lang('/about/company/'), status_code=301) assert_basic(self, 'about/company/')
def test_content_view_with_alias(self): """ Test view properly /cms/content/<node_id> :return: None """ response = assert_basic(self, self.node_rev_basic.node_id, 'content_node') self.assertRedirects(response, url_with_lang('/about/'), status_code=301)
def test_node_view_with_basic_i18n(self): """ Test basic page with multiple languages :return: None """ assert_basic(self, 'about/') assert_basic(self, 'about/', 'alias', self.second_lang)
def test_content_node_view_with_no_alias(self): """ Test view with a node with no path alias :return: None """ node_revision = create_basic('') assert_basic(self, node_revision.node_id, 'content_node')