Commits

David Chambers committed 6a14ded

Made update tests less pedantic.

Comments (0)

Files changed (1)

tests/__init__.py

         More text.
         ''')
     def test_basic_functionality(self, document):
-        self.assertEqual(
-        document.html,
-        u'<p>Text.</p>\n'
-        u'<div class="update"><div>\n'
-        u'<h4>Update — <time datetime="2011-08-20T20:30:00+00:00">20 August 2011</time></h4>\n'
-        u'<p>I was confused as to the definition of idempotent. It would\n'
-           u'be more accurate to describe the transaction as reversible.</p>\n'
-        u'</div></div>\n'
-        u'<p>More text.</p>'
-        )
+        self.assertTrue(document.html.startswith('<p>Text.</p>'))
+        self.assertTrue(document.html.endswith('<p>More text.</p>'))
+        self.assertTrue('<div class="update">' in document.html)
 
     @md('''
         Text.
         More text.
         ''')
     def test_heading_level(self, document):
-        self.assertEqual(
-        document.html,
-        u'<p>Text.</p>\n'
-        u'<div class="update"><div>\n'
-        u'<h3>Update — <time datetime="2011-08-20T20:30:00+00:00">20 August 2011</time></h3>\n'
-        u'<p>I was confused as to the definition of idempotent. It would\n'
-           u'be more accurate to describe the transaction as reversible.</p>\n'
-        u'</div></div>\n'
-        u'<p>More text.</p>'
-        )
+        self.assertTrue('<div class="update">' in document.html)
+        self.assertTrue('<h3>' in document.html)
 
     @md('''
         Text.
         More text.
         ''')
     def test_case_insensitivity(self, document):
-        self.assertEqual(
-        document.html,
-        u'<p>Text.</p>\n'
-        u'<div class="update"><div>\n'
-        u'<h4>Update — <time datetime="2011-08-20T20:30:00+00:00">20 August 2011</time></h4>\n'
-        u'<p>I was confused as to the definition of idempotent. It would\n'
-           u'be more accurate to describe the transaction as reversible.</p>\n'
-        u'</div></div>\n'
-        u'<p>More text.</p>'
-        )
+        self.assertTrue('<div class="update">' in document.html)
 
     @md('''
         Text.