예제 #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)