summaryrefslogtreecommitdiff
path: root/test/sql/test_functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-06-02 03:09:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-06-02 03:09:08 -0400
commit1dcf33e71280698007af718a2404034ef51dd1c7 (patch)
tree69c782bd69c4833213ec12229c35440cfcb8536c /test/sql/test_functions.py
parentdf21626ef065e80adfb39d3e48edc16f7c62ab0c (diff)
downloadsqlalchemy-1dcf33e71280698007af718a2404034ef51dd1c7.tar.gz
fix some tests
Diffstat (limited to 'test/sql/test_functions.py')
-rw-r--r--test/sql/test_functions.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py
index f08fde1f5..961845bac 100644
--- a/test/sql/test_functions.py
+++ b/test/sql/test_functions.py
@@ -195,6 +195,7 @@ class ExecuteTest(fixtures.TestBase):
def tearDown(self):
pass
+ @testing.uses_deprecated
def test_standalone_execute(self):
x = testing.db.func.current_date().execute().scalar()
y = testing.db.func.current_date().select().execute().scalar()
@@ -300,13 +301,13 @@ class ExecuteTest(fixtures.TestBase):
@testing.fails_on_everything_except('postgresql')
def test_as_from(self):
# TODO: shouldnt this work on oracle too ?
- x = testing.db.func.current_date().execute().scalar()
- y = testing.db.func.current_date().select().execute().scalar()
- z = testing.db.func.current_date().scalar()
- w = select(['*'], from_obj=[testing.db.func.current_date()]).scalar()
+ x = func.current_date(bind=testing.db).execute().scalar()
+ y = func.current_date(bind=testing.db).select().execute().scalar()
+ z = func.current_date(bind=testing.db).scalar()
+ w = select(['*'], from_obj=[func.current_date(bind=testing.db)]).scalar()
# construct a column-based FROM object out of a function, like in [ticket:172]
- s = select([sql.column('date', type_=DateTime)], from_obj=[testing.db.func.current_date()])
+ s = select([sql.column('date', type_=DateTime)], from_obj=[func.current_date(bind=testing.db)])
q = s.execute().first()[s.c.date]
r = s.alias('datequery').select().scalar()