]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- adjust boolean no_ck test to not use Boolean type
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 24 Jun 2016 02:19:55 +0000 (22:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 24 Jun 2016 02:19:55 +0000 (22:19 -0400)
to insert a non 0/1 integer; SQLA 1.1 now coerces it to
1/0

Change-Id: I4447547b98a5178c7a1185d5788bfb58ae8c23ee

tests/test_batch.py

index 490aee370a5398808cf0c4ea0f129b6f1834988d..7dad62ffaa5c3bcca66a904abc118f27b0124e2d 100644 (file)
@@ -1268,7 +1268,11 @@ class BatchRoundTripTest(TestBase):
         bar.create(self.conn)
         self.conn.execute(bar.insert(), {'id': 1, 'flag': True})
         self.conn.execute(bar.insert(), {'id': 2, 'flag': False})
-        self.conn.execute(bar.insert(), {'id': 3, 'flag': 5})
+        self.conn.execute(
+            # override Boolean type which as of 1.1 coerces numerics
+            # to 1/0
+            text("insert into bar (id, flag) values (:id, :flag)"),
+            {'id': 3, 'flag': 5})
 
         with self.op.batch_alter_table(
             "bar",