diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2022-05-29 21:34:37 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-05-29 21:34:37 +0000 |
| commit | c6b6b7bb7568b3f9a137bf39e5782c1b7019fd36 (patch) | |
| tree | 7a16d7dbaa04916ddfe05e89f3eeb54ee7c28108 /test/sql | |
| parent | 8ac7cb92b4972a08b8008b80b34989694510139f (diff) | |
| parent | cac8de9ab2d5fe04954947d96b78ee34522f3a2a (diff) | |
| download | sqlalchemy-c6b6b7bb7568b3f9a137bf39e5782c1b7019fd36.tar.gz | |
Merge "move bindparam quote application from compiler to default" into main
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_compiler.py | 19 | ||||
| -rw-r--r-- | test/sql/test_external_traversal.py | 2 |
2 files changed, 16 insertions, 5 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 4e40ae0a2..6ad2aa2c1 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -3749,9 +3749,13 @@ class BindParameterTest(AssertsCompiledSQL, fixtures.TestBase): def test_bind_param_escaping(self): """general bind param escape unit tests added as a result of - #8053 - # - #""" + #8053. + + However, note that the final application of an escaped param name + was moved out of compiler and into DefaultExecutionContext in + related issue #8056. + + """ SomeEnum = pep435_enum("SomeEnum") one = SomeEnum("one", 1) @@ -3784,8 +3788,13 @@ class BindParameterTest(AssertsCompiledSQL, fixtures.TestBase): dialect=dialect, compile_kwargs=dict(compile_keys=("_id", "_data")) ) params = compiled.construct_params({"_id": 1, "_data": one}) - eq_(params, {'"_id"': 1, '"_data"': one}) - eq_(compiled._bind_processors, {'"_data"': mock.ANY}) + + eq_(params, {"_id": 1, "_data": one}) + eq_(compiled._bind_processors, {"_data": mock.ANY}) + + # previously, this was: + # eq_(params, {'"_id"': 1, '"_data"': one}) + # eq_(compiled._bind_processors, {'"_data"': mock.ANY}) def test_expanding_non_expanding_conflict(self): """test #8018""" diff --git a/test/sql/test_external_traversal.py b/test/sql/test_external_traversal.py index 13116225c..5e46808b3 100644 --- a/test/sql/test_external_traversal.py +++ b/test/sql/test_external_traversal.py @@ -197,6 +197,8 @@ class TraversalTest( def test_bindparam_key_proc_for_copies(self, meth, name): r"""test :ticket:`6249`. + Revised for :ticket:`8056`. + The key of the bindparam needs spaces and other characters escaped out for the POSTCOMPILE regex to work correctly. |
