MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_null_pk

Method test_null_pk

test/orm/test_composites.py:1142–1153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1140
1141 @testing.fails_on_everything_except("sqlite")
1142 def test_null_pk(self):
1143 Graph, Version = self.classes.Graph, self.classes.Version
1144
1145 sess = fixture_session()
1146
1147 # test pk with one column NULL
1148 # only sqlite can really handle this
1149 g = Graph(Version(2, None))
1150 sess.add(g)
1151 sess.commit()
1152 g2 = sess.query(Graph).filter_by(version=Version(2, None)).one()
1153 eq_(g.version, g2.version)
1154
1155
1156class PrimaryKeyTestDataclasses(PrimaryKeyTest):

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
eq_Function · 0.90
GraphClass · 0.70
VersionClass · 0.70
addMethod · 0.45
commitMethod · 0.45
oneMethod · 0.45
filter_byMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected