Skip to content

Commit 9e83ac5

Browse files
author
James William Pye
committed
Fix import and remove references to strict escaping.
1 parent fa9cd0e commit 9e83ac5

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

postgresql/test/test_strings.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66
import os
77
import unittest
8-
import postgresql.strings as pg_str
8+
from .. import string as pg_str
99

1010
# strange possibility, split, normalized
1111
split_qname_samples = [
@@ -217,20 +217,12 @@ def test_qname(self):
217217
)
218218

219219
def test_quotes(self):
220-
self.failUnlessEqual(
221-
pg_str.quote_literal_strict("""foo'bar"""),
222-
"""'foo''bar'"""
223-
)
224220
self.failUnlessEqual(
225221
pg_str.quote_literal("""foo'bar"""),
226-
"""E'foo''bar'"""
222+
"""'foo''bar'"""
227223
)
228224
self.failUnlessEqual(
229225
pg_str.quote_literal("""\\foo'bar\\"""),
230-
"""E'\\\\foo''bar\\\\'"""
231-
)
232-
self.failUnlessEqual(
233-
pg_str.quote_literal_strict("""\\foo'bar\\"""),
234226
"""'\\foo''bar\\'"""
235227
)
236228
self.failUnlessEqual(
@@ -258,7 +250,7 @@ def test_quotes(self):
258250
if chr(x) != "'"
259251
])
260252
self.failUnlessEqual(
261-
pg_str.escape_literal_strict(chars),
253+
pg_str.escape_literal(chars),
262254
chars,
263255
)
264256
chars = ''.join([

0 commit comments

Comments
 (0)