MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_merge_no_version

Method test_merge_no_version

test/orm/test_versioning.py:506–523  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

504 assert f1s2.value == f1s1.value
505
506 def test_merge_no_version(self):
507 Foo = self.classes.Foo
508
509 s1 = self._fixture()
510 f1 = Foo(value="f1")
511 s1.add(f1)
512 s1.commit()
513
514 f1.value = "f2"
515 with conditional_sane_rowcount_warnings(update=True):
516 s1.commit()
517
518 f2 = Foo(id=f1.id, value="f3")
519 f3 = s1.merge(f2)
520 assert f3 is f1
521 with conditional_sane_rowcount_warnings(update=True):
522 s1.commit()
523 eq_(f3.version_id, 3)
524
525 def test_merge_correct_version(self):
526 Foo = self.classes.Foo

Callers

nothing calls this directly

Calls 7

_fixtureMethod · 0.95
eq_Function · 0.90
FooClass · 0.70
addMethod · 0.45
commitMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected