MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_merge_no_version

Method test_merge_no_version

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

Source from the content-addressed store, hash-verified

500 assert f1s2.value == f1s1.value
501
502 def test_merge_no_version(self):
503 Foo = self.classes.Foo
504
505 s1 = self._fixture()
506 f1 = Foo(value="f1")
507 s1.add(f1)
508 s1.commit()
509
510 f1.value = "f2"
511 with conditional_sane_rowcount_warnings(update=True):
512 s1.commit()
513
514 f2 = Foo(id=f1.id, value="f3")
515 f3 = s1.merge(f2)
516 assert f3 is f1
517 with conditional_sane_rowcount_warnings(update=True):
518 s1.commit()
519 eq_(f3.version_id, 3)
520
521 def test_merge_correct_version(self):
522 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