summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r--test/dialect/test_postgresql.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py
index 769f18ce9..a537ee3e9 100644
--- a/test/dialect/test_postgresql.py
+++ b/test/dialect/test_postgresql.py
@@ -74,6 +74,18 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
'RETURNING length(mytable.name) AS length_1'
, dialect=dialect)
+ def test_render_literal(self):
+ dialect = postgresql.dialect()
+ compiler = dialect.statement_compiler(dialect, None)
+ for value, exp in [
+ ('hi', "'hi'"),
+ ("with 'quotes'", "'with ''quotes'''"),
+ ('%.%', "'%%.%%'")
+ ]:
+ eq_(
+ compiler.render_literal_value(value, None),
+ exp
+ )
def test_insert_returning(self):
dialect = postgresql.dialect()