Beispiel #1
0
class WikiFormatterTestCase(FormatterTestCase):

    def setUp(self):
        FormatterTestCase.setUp(self)
        self.wf = WikiFormatter(self.env)

    # Tests

    def test_styles(self):
        # HMTL format for email notifications is yet unsupported for wiki.
        #self.assertTrue('text/html' in self.tf.styles('email', 'wiki'))
        self.assertTrue('text/plain' in self.wf.styles('email', 'wiki'))
        self.assertFalse('text/plain' in self.wf.styles('email', 'ticket'))
        self.assertEqual('text/plain',
                         self.wf.alternative_style_for('email', 'wiki',
                                                       'text/blah'))
        self.assertEqual('text/plain',
                         self.wf.alternative_style_for('email', 'wiki',
                                                       'text/html'))
        self.assertEqual(None,
                         self.wf.alternative_style_for('email', 'wiki',
                                                       'text/plain'))

    def test_template_dirs_added(self):
        self.assertTrue(self.wf in Chrome(self.env).template_providers)
Beispiel #2
0
class WikiFormatterTestCase(FormatterTestCase):
    def setUp(self):
        FormatterTestCase.setUp(self)
        self.wf = WikiFormatter(self.env)

    # Tests

    def test_styles(self):
        # HMTL format for email notifications is yet unsupported for wiki.
        #self.assertTrue('text/html' in self.tf.styles('email', 'wiki'))
        self.assertTrue('text/plain' in self.wf.styles('email', 'wiki'))
        self.assertFalse('text/plain' in self.wf.styles('email', 'ticket'))
        self.assertEqual(
            'text/plain',
            self.wf.alternative_style_for('email', 'wiki', 'text/blah'))
        self.assertEqual(
            'text/plain',
            self.wf.alternative_style_for('email', 'wiki', 'text/html'))
        self.assertEqual(
            None, self.wf.alternative_style_for('email', 'wiki', 'text/plain'))

    def test_template_dirs_added(self):
        self.assertTrue(self.wf in Chrome(self.env).template_providers)
Beispiel #3
0
 def setUp(self):
     FormatterTestCase.setUp(self)
     self.wf = WikiFormatter(self.env)
 def setUp(self):
     FormatterTestCase.setUp(self)
     self.wf = WikiFormatter(self.env)