diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-08-22 16:01:23 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-08-22 16:01:23 -0400 |
| commit | 03e47a8255476d9ed50c5aec73e6c272761d67eb (patch) | |
| tree | 14a66e0932e21bc011bf642fe55436e60e418743 /test/sql | |
| parent | 8712ef2f81498fe59b9636ba150833d779e60781 (diff) | |
| download | sqlalchemy-03e47a8255476d9ed50c5aec73e6c272761d67eb.tar.gz | |
- repair the inspection hook in sqltypes to not be fooled
by mock and other __getattr__ impostors
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_types.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 90fac97c2..d562c83ce 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -26,7 +26,7 @@ from sqlalchemy.testing import AssertsCompiledSQL, AssertsExecutionResults, \ from sqlalchemy.testing.util import picklers from sqlalchemy.testing.util import round_decimal from sqlalchemy.testing import fixtures - +from sqlalchemy.testing import mock class AdaptTest(fixtures.TestBase): @@ -1668,6 +1668,14 @@ class ExpressionTest( types.NULLTYPE ) + def test_detect_coercion_not_fooled_by_mock(self): + m1 = mock.Mock() + is_( + bindparam('x', m1).type, + types.NULLTYPE + ) + + class CompileTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' |
