def setUp(self): self.input = self.read_file_content('full_markdown_input.md') self.expected = self.read_file_content('full_markdown_expected.html') self.login() self.article_page = self.post_article(TITLE_1, self.input) self.article_id = get_article_id(self.article_page)
def test_no_previous_link(self): first_article_id = get_article_id(self.article_page) next_title = 'next article title' ids = self.create_articles([next_title]) self.assert_no_link(first_article_id, get_previous_link) self.assert_link(first_article_id, ids[0], next_title, get_next_link)
def test_about_me_page(self): self.login() article_id = get_article_id(self.post_article(TITLE_1, CONTENT_1)) settings.ABOUT_ME_ID = article_id about_me = self.get_about_me_page() self.assertAllNavbarEntries(about_me, False, False, True)
def setUp(self): self.login() self.token = "test_TEST " self.title = self.token * 10 self.content = self.token * 200 article_id = get_article_id(self.post_article(self.title, self.content)) settings.ABOUT_ME_ID = article_id
def create_articles(self, titles): ids = [] for title in titles: ids.append(get_article_id(self.post_article(title, CONTENT_1))) return ids