Skip to content

Commit

Permalink
- remove artifacts from last merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jul 1, 2020
1 parent 17f28d4 commit 5e3af05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
16 changes: 4 additions & 12 deletions src/DocumentTemplate/tests/testDTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import unittest
from html import escape

import six

from ..html_quote import html_quote


Expand Down Expand Up @@ -274,16 +272,10 @@ def test_sql_quote(self):
self.assertEqual(html(x=u"Moe's Bar"), u"Moe''s Bar")
self.assertEqual(html(x=b"Moe's Bar"), u"Moe''s Bar")

if six.PY3:
self.assertEqual(html(x=u"Moe's B%sr" % special),
u"Moe''s B%sr" % special)
self.assertEqual(html(x=b"Moe's B%sr" % special.encode('UTF-8')),
u"Moe''s B%sr" % special)
else:
self.assertEqual(html(x=u"Moe's B%sr" % special),
"Moe''s B%sr" % special.encode('UTF-8'))
self.assertEqual(html(x=b"Moe's B%sr" % special.encode('UTF-8')),
b"Moe''s B%sr" % special.encode('UTF-8'))
self.assertEqual(html(x=u"Moe's B%sr" % special),
u"Moe''s B%sr" % special)
self.assertEqual(html(x=b"Moe's B%sr" % special.encode('UTF-8')),
u"Moe''s B%sr" % special)

def test_fmt(self):
html = self.doc_class(
Expand Down
10 changes: 2 additions & 8 deletions src/DocumentTemplate/tests/test_DT_Var.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import unittest

import six


class TestNewlineToBr(unittest.TestCase):

Expand Down Expand Up @@ -119,12 +117,8 @@ def test_sql_quote(self):
sql_quote('\x00Hello\x00\x00World\x00'), 'HelloWorld')

self.assertEqual("\xea".encode("utf-8"), b"\xc3\xaa")
if six.PY3:
self.assertEqual(sql_quote(b"\xc3\xaa'"), "\xea''")
self.assertEqual(sql_quote("\xea'"), "\xea''")
else:
self.assertEqual(sql_quote(b"\xc3\xaa'"), b"\xc3\xaa''")
self.assertEqual(sql_quote("\xea'"), b"\xc3\xaa''")
self.assertEqual(sql_quote(b"\xc3\xaa'"), "\xea''")
self.assertEqual(sql_quote("\xea'"), "\xea''")

self.assertEqual(
sql_quote(b"carriage\rreturn"), "carriagereturn")
Expand Down

0 comments on commit 5e3af05

Please sign in to comment.