示例#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
示例#2
0
文件: tests.py 项目: samrose/sapling
    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
示例#3
0
文件: tests.py 项目: mivanov/editkit
 def test_deleted_inserted(self):
     htmlDiff = HtmlFieldDiff('abc', 'def')
     self.assertTrue('def</ins>' in htmlDiff.as_html())
示例#4
0
文件: tests.py 项目: mivanov/editkit
 def test_identical_fields(self):
     htmlDiff = HtmlFieldDiff('abc', 'abc')
     self.assertEquals(htmlDiff.as_dict(), None)
示例#5
0
 def test_deleted_inserted(self):
     htmlDiff = HtmlFieldDiff('abc', 'def')
     self.assertTrue('def</ins>' in htmlDiff.as_html())
示例#6
0
 def test_identical_fields(self):
     htmlDiff = HtmlFieldDiff('abc', 'abc')
     self.assertEquals(htmlDiff.as_dict(), None)