MCPcopy
hub / github.com/sqlalchemy/alembic / test_update_multi_match

Method test_update_multi_match

tests/test_version_table.py:295–311  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

293 self.updater.update_to_step(_up("x", "b"))
294
295 def test_update_multi_match(self):
296 with self.connection.begin():
297 self.connection.execute(
298 version_table.insert(), dict(version_num="a")
299 )
300 self.connection.execute(
301 version_table.insert(), dict(version_num="a")
302 )
303
304 self.updater.heads.add("a")
305 assert_raises_message(
306 CommandError,
307 "Online migration expected to match one row when updating "
308 "'a' to 'b' in 'version_table'; 2 found",
309 self.updater.update_to_step,
310 _up("a", "b"),
311 )
312
313 def test_update_multi_match_no_sane_rowcount(self):
314 with self.connection.begin():

Callers

nothing calls this directly

Calls 3

assert_raises_messageFunction · 0.90
_upFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected