summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-07-14 18:09:54 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-07-14 18:09:54 -0400
commita49ec1cf778811fb3717bd0ace183ba0ea5ba4d4 (patch)
treecee11129e7981610b10a852ad8623d3ba89e9283 /test/sql
parent5ec6ec9cbb1c29774c50bafed781e649ed481418 (diff)
downloadsqlalchemy-a49ec1cf778811fb3717bd0ace183ba0ea5ba4d4.tar.gz
- Added a "str()" step to the dialect_kwargs iteration for
Python version < 2.6.5, working around the "no unicode keyword arg" bug as these args are passed along as keyword args within some reflection processes. fixes #3123
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_metadata.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py
index 7711db816..9542711cb 100644
--- a/test/sql/test_metadata.py
+++ b/test/sql/test_metadata.py
@@ -2517,6 +2517,19 @@ class DialectKWArgTest(fixtures.TestBase):
'otherunknown_foo': 'bar'}
) # still populates
+ def test_runs_safekwarg(self):
+
+ with mock.patch("sqlalchemy.util.safe_kwarg",
+ lambda arg: "goofy_%s" % arg):
+ with self._fixture():
+ idx = Index('a', 'b')
+ idx.kwargs[u'participating_x'] = 7
+
+ eq_(
+ list(idx.dialect_kwargs),
+ ['goofy_participating_x']
+ )
+
def test_combined(self):
with self._fixture():
idx = Index('a', 'b', 'c', participating_x=7,