Merge "tests: Pass parameters to sqlalchemy.text() as bindparams"
This commit is contained in:
@@ -180,9 +180,7 @@ class TestDatabaseFixture(testtools.TestCase):
|
|||||||
conn.execute(
|
conn.execute(
|
||||||
sa.text(
|
sa.text(
|
||||||
"INSERT INTO cell_mappings (uuid, name) VALUES (:uuid, :name)"
|
"INSERT INTO cell_mappings (uuid, name) VALUES (:uuid, :name)"
|
||||||
),
|
).bindparams(uuid=uuid, name='fake-cell'),
|
||||||
uuid=uuid,
|
|
||||||
name='fake-cell',
|
|
||||||
)
|
)
|
||||||
result = conn.execute(sa.text("SELECT * FROM cell_mappings"))
|
result = conn.execute(sa.text("SELECT * FROM cell_mappings"))
|
||||||
rows = result.fetchall()
|
rows = result.fetchall()
|
||||||
@@ -226,9 +224,7 @@ class TestDatabaseFixture(testtools.TestCase):
|
|||||||
conn.execute(
|
conn.execute(
|
||||||
sa.text(
|
sa.text(
|
||||||
"INSERT INTO cell_mappings (uuid, name) VALUES (:uuid, :name)"
|
"INSERT INTO cell_mappings (uuid, name) VALUES (:uuid, :name)"
|
||||||
),
|
).bindparams(uuid=uuid, name='fake-cell'),
|
||||||
uuid=uuid,
|
|
||||||
name='fake-cell',
|
|
||||||
)
|
)
|
||||||
result = conn.execute(sa.text("SELECT * FROM cell_mappings"))
|
result = conn.execute(sa.text("SELECT * FROM cell_mappings"))
|
||||||
rows = result.fetchall()
|
rows = result.fetchall()
|
||||||
|
Reference in New Issue
Block a user