~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to pybb/tests/postmarkup.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
from pybb.markups import mypostmarkup
4
4
 
 
5
 
5
6
class PostmarkupTestCase(unittest.TestCase):
 
7
 
6
8
    def setUp(self):
7
9
        self.markup = mypostmarkup.markup
8
10
 
11
13
        self.assertEqual('<a href="%s">%s</a>' % (link, link),
12
14
                         self.markup('[url]%s[/url]' % link))
13
15
 
14
 
 
15
16
    def testPlainTest(self):
16
17
        text = 'just a text'
17
18
        self.assertEqual(text, self.markup(text))
22
23
 
23
24
    def testCodeTag(self):
24
25
        text = 'foo [code]foo\nbar[/code] bar'
25
 
        self.assertEqual('foo <pre><code>foo\nbar</code></pre>bar', self.markup(text))
26
 
 
 
26
        self.assertEqual(
 
27
            'foo <pre><code>foo\nbar</code></pre>bar', self.markup(text))