summarylogtreecommitdiffstats
path: root/PR34.patch
diff options
context:
space:
mode:
Diffstat (limited to 'PR34.patch')
-rw-r--r--PR34.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/PR34.patch b/PR34.patch
new file mode 100644
index 000000000000..53f1ff537280
--- /dev/null
+++ b/PR34.patch
@@ -0,0 +1,79 @@
+From 36348bf4c01f52c3461e7ba4d20b1edfc54dba50 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mark=C3=A9ta=20Cal=C3=A1bkov=C3=A1?=
+ <meggy.calabkova@gmail.com>
+Date: Tue, 3 Aug 2021 12:48:30 +0200
+Subject: [PATCH 1/3] compatibility with pyramid 2
+
+---
+ pyramid_chameleon/tests/test_text.py | 7 +++----
+ pyramid_chameleon/tests/test_zpt.py | 5 ++---
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/pyramid_chameleon/tests/test_text.py b/pyramid_chameleon/tests/test_text.py
+index ca294ca..37801a5 100644
+--- a/pyramid_chameleon/tests/test_text.py
++++ b/pyramid_chameleon/tests/test_text.py
+@@ -1,7 +1,6 @@
+ import sys
+ import unittest
+
+-from pyramid.compat import binary_type
+ from pyramid import testing
+
+ class Base(object):
+@@ -97,7 +96,7 @@ def test_call(self):
+ lookup = DummyLookup()
+ instance = self._makeOne(minimal, lookup)
+ result = instance({}, {})
+- self.assertTrue(isinstance(result, binary_type))
++ self.assertTrue(isinstance(result, bytes))
+ self.assertEqual(result, b'Hello.\n')
+
+ def test_call_with_nondict_value(self):
+@@ -111,7 +110,7 @@ def test_call_nonminimal(self):
+ lookup = DummyLookup()
+ instance = self._makeOne(nonminimal, lookup)
+ result = instance({'name':'Chris'}, {})
+- self.assertTrue(isinstance(result, binary_type))
++ self.assertTrue(isinstance(result, bytes))
+ self.assertEqual(result, b'Hello, Chris!\n')
+
+ def test_implementation(self):
+@@ -119,7 +118,7 @@ def test_implementation(self):
+ lookup = DummyLookup()
+ instance = self._makeOne(minimal, lookup)
+ result = instance.implementation()()
+- self.assertTrue(isinstance(result, binary_type))
++ self.assertTrue(isinstance(result, bytes))
+ self.assertEqual(result, b'Hello.\n')
+
+ class DummyLookup(object):
+diff --git a/pyramid_chameleon/tests/test_zpt.py b/pyramid_chameleon/tests/test_zpt.py
+index 9678904..2db2206 100644
+--- a/pyramid_chameleon/tests/test_zpt.py
++++ b/pyramid_chameleon/tests/test_zpt.py
+@@ -2,7 +2,6 @@
+ import unittest
+
+ from pyramid import testing
+-from pyramid.compat import text_type
+
+ class Base(object):
+ def setUp(self):
+@@ -54,7 +53,7 @@ def test_call(self):
+ lookup = DummyLookup()
+ instance = self._makeOne(minimal, lookup)
+ result = instance({}, {})
+- self.assertTrue(isinstance(result, text_type))
++ self.assertTrue(isinstance(result, str))
+ self.assertEqual(result.rstrip('\n'),
+ '<div xmlns="http://www.w3.org/1999/xhtml">\n</div>')
+
+@@ -121,7 +120,7 @@ def test_implementation(self):
+ lookup = DummyLookup()
+ instance = self._makeOne(minimal, lookup)
+ result = instance.implementation()()
+- self.assertTrue(isinstance(result, text_type))
++ self.assertTrue(isinstance(result, str))
+ self.assertEqual(result.rstrip('\n'),
+ '<div xmlns="http://www.w3.org/1999/xhtml">\n</div>')