summaryrefslogtreecommitdiff
path: root/test/engine/test_execute.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-08-27 15:11:53 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-08-27 15:11:53 -0400
commit326f2e4f60744d8073eaa4eda69d1dbb46bc9f50 (patch)
tree1564027071fa60d1f656edf59e84d8361238b7e7 /test/engine/test_execute.py
parent8a307726b34d4adb374b0b618205dbcac31a15f5 (diff)
downloadsqlalchemy-326f2e4f60744d8073eaa4eda69d1dbb46bc9f50.tar.gz
- [feature] The "required" flag is set to
True by default, if not passed explicitly, on bindparam() if the "value" or "callable" parameters are not passed. This will cause statement execution to check for the parameter being present in the final collection of bound parameters, rather than implicitly assigning None. [ticket:2556]
Diffstat (limited to 'test/engine/test_execute.py')
-rw-r--r--test/engine/test_execute.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index 1067600df..900a3c8ee 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -19,7 +19,7 @@ from sqlalchemy.engine.base import Connection, Engine
from test.lib import fixtures
import StringIO
-users, metadata = None, None
+users, metadata, users_autoinc = None, None, None
class ExecuteTest(fixtures.TestBase):
@classmethod
def setup_class(cls):
@@ -315,11 +315,9 @@ class ExecuteTest(fixtures.TestBase):
def test_empty_insert(self):
"""test that execute() interprets [] as a list with no params"""
- result = \
- testing.db.execute(users_autoinc.insert().
- values(user_name=bindparam('name')), [])
- eq_(testing.db.execute(users_autoinc.select()).fetchall(), [(1,
- None)])
+ testing.db.execute(users_autoinc.insert().
+ values(user_name=bindparam('name', None)), [])
+ eq_(testing.db.execute(users_autoinc.select()).fetchall(), [(1, None)])
@testing.requires.ad_hoc_engines
def test_engine_level_options(self):