Ejemplo n.º 1
0
    def test_daisydiff_broken_fallback(self):
        """
        In case something is wrong with the DaisyDiff service, fallback to
        text-only diff
        """
        backup = HtmlFieldDiff.DAISYDIFF_URL

        HtmlFieldDiff.DAISYDIFF_URL = 'http://badurl'
        htmlDiff = HtmlFieldDiff('abc', 'def')
        self.assertTrue('<del>abc</del>' in htmlDiff.as_html())

        HtmlFieldDiff.DAISYDIFF_URL = backup
Ejemplo n.º 2
0
    def test_daisydiff_broken_fallback(self):
        """
        In case something is wrong with the DaisyDiff service, fallback to
        text-only diff
        """
        backup = HtmlFieldDiff.DAISYDIFF_URL

        HtmlFieldDiff.DAISYDIFF_URL = 'http://badurl'
        htmlDiff = HtmlFieldDiff('abc', 'def')
        self.assertTrue('<del>abc</del>' in htmlDiff.as_html())

        HtmlFieldDiff.DAISYDIFF_URL = backup
Ejemplo n.º 3
0
 def test_deleted_inserted(self):
     htmlDiff = HtmlFieldDiff('abc', 'def')
     self.assertTrue('def</ins>' in htmlDiff.as_html())
Ejemplo n.º 4
0
 def test_identical_fields(self):
     htmlDiff = HtmlFieldDiff('abc', 'abc')
     self.assertEquals(htmlDiff.as_dict(), None)
Ejemplo n.º 5
0
 def test_deleted_inserted(self):
     htmlDiff = HtmlFieldDiff('abc', 'def')
     self.assertTrue('def</ins>' in htmlDiff.as_html())
Ejemplo n.º 6
0
 def test_identical_fields(self):
     htmlDiff = HtmlFieldDiff('abc', 'abc')
     self.assertEquals(htmlDiff.as_dict(), None)