def test_cut_tag(self): title = u'Тестирование тега <cut>' short_text = u'Текст в блоге' main_text = u'Текст в топике' text = short_text + u'<cut>' + main_text + u'</cut>' self.create_page.create_simple_topic(self.BLOG, title, text) self.create_page.form.submit() topic = TopicPage(self.driver).topic self.assertEqual(topic.get_title(), title) self.assertEqual(topic.get_text(), short_text + u' ' + main_text) topic.open_blog() blog = BlogPage(self.driver).blog self.assertIn(short_text, blog.get_text()) self.assertNotIn(main_text, blog.get_text())
def test_create_simple_topic(self): title = u'Тестовый заголовок' main_text = u'Основной текст' self.create_page.create_simple_topic(self.BLOG, title, main_text) self.create_page.form.submit() topic = TopicPage(self.driver).topic self.assertEqual(topic.get_title(), title) self.assertEqual(topic.get_text(), main_text) topic.open_blog() blog = BlogPage(self.driver).blog self.assertEqual(blog.get_title(), title) self.assertEqual(blog.get_text(), main_text) topic.delete() self.assertNotEqual(blog.get_title(), title) self.assertNotEqual(blog.get_text(), main_text)