MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_save_null

Method test_save_null

test/orm/test_composites.py:609–629  ·  view source on GitHub ↗

test saving a null composite value See google groups thread for more context: https://groups.google.com/group/sqlalchemy/browse_thread/thread/0c6580a1761b2c29

(self)

Source from the content-addressed store, hash-verified

607 )
608
609 def test_save_null(self):
610 """test saving a null composite value
611
612 See google groups thread for more context:
613 https://groups.google.com/group/sqlalchemy/browse_thread/thread/0c6580a1761b2c29
614
615 """
616
617 Graph, Edge = self.classes.Graph, self.classes.Edge
618
619 sess = fixture_session()
620 g = Graph(id=1)
621 e = Edge(None, None)
622 g.edges.append(e)
623
624 sess.add(g)
625 sess.commit()
626
627 g2 = sess.get(Graph, 1)
628 assert g2.edges[-1].start.x is None
629 assert g2.edges[-1].start.y is None
630
631 def test_expire(self):
632 Graph, Point = self.classes.Graph, self.classes.Point

Callers

nothing calls this directly

Calls 7

fixture_sessionFunction · 0.90
GraphClass · 0.70
EdgeClass · 0.70
appendMethod · 0.45
addMethod · 0.45
commitMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected