MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_unrelated_flush

Method test_unrelated_flush

test/ext/test_mutable.py:477–486  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

475 assert f2 in sess.dirty
476
477 def test_unrelated_flush(self):
478 sess = fixture_session()
479 f1 = Foo(data={"a": "b"}, unrelated_data="unrelated")
480 sess.add(f1)
481 sess.flush()
482 f1.unrelated_data = "unrelated 2"
483 sess.flush()
484 f1.data["a"] = "c"
485 sess.commit()
486 eq_(f1.data["a"], "c")
487
488 def _test_non_mutable(self):
489 sess = fixture_session()

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
eq_Function · 0.90
FooClass · 0.70
addMethod · 0.45
flushMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected