MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_get

Method test_get

test/ext/test_horizontal_shard.py:220–229  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

218 return sess
219
220 def test_get(self):
221 sess = self._fixture_data()
222 tokyo = sess.get(WeatherLocation, 1)
223 eq_(tokyo.city, "Tokyo")
224
225 newyork = sess.get(WeatherLocation, 2)
226 eq_(newyork.city, "New York")
227
228 t2 = sess.get(WeatherLocation, 1)
229 is_(t2, tokyo)
230
231 def test_get_one(self):
232 sess = self._fixture_data()

Callers

nothing calls this directly

Calls 4

_fixture_dataMethod · 0.95
eq_Function · 0.90
is_Function · 0.90
getMethod · 0.45

Tested by

no test coverage detected