~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to pybb/tests/postmarkup.py

  • Committer: Holger Rapp
  • Date: 2016-08-08 10:06:42 UTC
  • mto: This revision was merged to the branch mainline in revision 419.
  • Revision ID: sirver@gmx.de-20160808100642-z62vwqitxoyl5fh4
Added the apt-get update script I run every 30 days.

Show diffs side-by-side

added added

removed removed

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