Пример #1
0
    def test_empty_03(self):
        from markdown.links.linkcreator import LinkCreator
        creator = LinkCreator()
        link, reference = creator.create('', '   ', '')
        link_right = '[   ]()'

        self.assertEqual(link, link_right)
        self.assertIsNone(reference)
Пример #2
0
    def test_empty_03(self):
        from markdown.links.linkcreator import LinkCreator
        creator = LinkCreator()
        link, reference = creator.create(u'', u'   ', u'')
        link_right = u'[   ]()'

        self.assertEqual(link, link_right)
        self.assertIsNone(reference)
Пример #3
0
    def test_title_01(self):
        from markdown.links.linkcreator import LinkCreator
        creator = LinkCreator()
        link, reference = creator.create(u'http://jenyay.net', u'Комментарий',
                                         u'Заголовок')
        link_right = u'[Комментарий](http://jenyay.net "Заголовок")'

        self.assertEqual(link, link_right)
        self.assertIsNone(reference)
Пример #4
0
    def test_link_01(self):
        from markdown.links.linkcreator import LinkCreator
        creator = LinkCreator()
        link, reference = creator.create('http://jenyay.net', 'Комментарий',
                                         '')
        link_right = '[Комментарий](http://jenyay.net)'

        self.assertEqual(link, link_right)
        self.assertIsNone(reference)
Пример #5
0
    def test_title_01(self):
        from markdown.links.linkcreator import LinkCreator
        creator = LinkCreator()
        link, reference = creator.create('http://jenyay.net',
                                         'Комментарий',
                                         'Заголовок')
        link_right = '[Комментарий](http://jenyay.net "Заголовок")'

        self.assertEqual(link, link_right)
        self.assertIsNone(reference)
Пример #6
0
    def test_link_01(self):
        from markdown.links.linkcreator import LinkCreator
        creator = LinkCreator()
        link, reference = creator.create(u'http://jenyay.net',
                                         u'Комментарий',
                                         u'')
        link_right = u'[Комментарий](http://jenyay.net)'

        self.assertEqual(link, link_right)
        self.assertIsNone(reference)