summaryrefslogtreecommitdiff
path: root/test/dialect/mssql/test_compiler.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2021-07-25 13:16:31 -0600
committerGord Thompson <gord@gordthompson.com>2021-07-26 10:08:30 -0600
commitc6b1d24fe71c22e4d2117d084f06df3597671985 (patch)
tree5f68c860d9ea12d139baf8badefe49c99904b11d /test/dialect/mssql/test_compiler.py
parent6bc755d2ab9235ce4c3670ed3c3c3799d6c4ad5e (diff)
downloadsqlalchemy-c6b1d24fe71c22e4d2117d084f06df3597671985.tar.gz
Modernize tests - dml_whereclause
Fixed issue where the unit of work would internally use a 2.0-deprecated SQL expression form, emitting a deprecation warning when SQLALCHEMY_WARN_20 were enabled. Fixes: #6812 Change-Id: I0a031e728527a1c3382848b6ddc793939362b128
Diffstat (limited to 'test/dialect/mssql/test_compiler.py')
-rw-r--r--test/dialect/mssql/test_compiler.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/dialect/mssql/test_compiler.py b/test/dialect/mssql/test_compiler.py
index b0434115d..c512ae441 100644
--- a/test/dialect/mssql/test_compiler.py
+++ b/test/dialect/mssql/test_compiler.py
@@ -137,7 +137,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
def test_update(self):
t = table("sometable", column("somecolumn"))
self.assert_compile(
- t.update(t.c.somecolumn == 7),
+ t.update().where(t.c.somecolumn == 7),
"UPDATE sometable SET somecolumn=:somecolum"
"n WHERE sometable.somecolumn = "
":somecolumn_1",
@@ -703,7 +703,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
schema="paj",
)
self.assert_compile(
- tbl.delete(tbl.c.id == 1),
+ tbl.delete().where(tbl.c.id == 1),
"DELETE FROM paj.test WHERE paj.test.id = " ":id_1",
)
s = select(tbl.c.id).where(tbl.c.id == 1)
@@ -723,7 +723,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
schema="banana.paj",
)
self.assert_compile(
- tbl.delete(tbl.c.id == 1),
+ tbl.delete().where(tbl.c.id == 1),
"DELETE FROM banana.paj.test WHERE " "banana.paj.test.id = :id_1",
)
s = select(tbl.c.id).where(tbl.c.id == 1)
@@ -744,7 +744,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
schema="banana split.paj",
)
self.assert_compile(
- tbl.delete(tbl.c.id == 1),
+ tbl.delete().where(tbl.c.id == 1),
"DELETE FROM [banana split].paj.test WHERE "
"[banana split].paj.test.id = :id_1",
)
@@ -767,7 +767,7 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
schema="banana split.paj with a space",
)
self.assert_compile(
- tbl.delete(tbl.c.id == 1),
+ tbl.delete().where(tbl.c.id == 1),
"DELETE FROM [banana split].[paj with a "
"space].test WHERE [banana split].[paj "
"with a space].test.id = :id_1",