Changeset 5875 for main/waeup.sirp/trunk/src
- Timestamp:
- 18 Mar 2011, 17:50:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_helpers.py
r5739 r5875 1 # -*- coding: utf-8 -*- 2 1 3 ## 2 4 ## test_helpers.py … … 133 135 return 134 136 137 class ReST2HTMLTestCase(unittest.TestCase): 135 138 139 def setUp(self): 140 self.expected = u'<div class="document">\n\n\n<p>Some ' 141 self.expected += u'test with \xfcmlaut</p>\n</div>' 142 return 143 144 def test_ascii_umlauts(self): 145 # Make sure we convert umlauts correctly to unicode. 146 source = 'Some test with ümlaut' 147 result = helpers.ReST2HTML(source) 148 self.assertEqual(result, self.expected) 149 150 def test_unicode_umlauts(self): 151 # Make sure we convert umlauts correctly to unicode. 152 source = u'Some test with ümlaut' 153 result = helpers.ReST2HTML(source) 154 self.assertEqual(result, self.expected) 155 156 def test_unicode_output_from_ascii(self): 157 source = 'Some test with ümlaut' 158 self.assertTrue(isinstance(helpers.ReST2HTML(source), unicode)) 159 160 def test_unicode_output_from_unicode(self): 161 source = u'Some test with ümlaut' 162 self.assertTrue(isinstance(helpers.ReST2HTML(source), unicode)) 163 164 136 165 class FactoryBaseTestCase(unittest.TestCase): 137 166 … … 148 177 # Register local test cases... 149 178 for testcase in [ 179 ReST2HTMLTestCase, 150 180 FactoryBaseTestCase, 151 181 CopyFileSystemTreeTestCase,
Note: See TracChangeset for help on using the changeset viewer.