(self)
| 229 | is_(t2, tokyo) |
| 230 | |
| 231 | def test_get_one(self): |
| 232 | sess = self._fixture_data() |
| 233 | brasilia = sess.get_one(WeatherLocation, 6) |
| 234 | eq_(brasilia.id, 6) |
| 235 | eq_(brasilia.city, "Brasilia") |
| 236 | |
| 237 | toronto = sess.get_one(WeatherLocation, 3) |
| 238 | eq_(toronto.id, 3) |
| 239 | eq_(toronto.city, "Toronto") |
| 240 | |
| 241 | with expect_raises_message( |
| 242 | exc.NoResultFound, "No row was found when one was required" |
| 243 | ): |
| 244 | sess.get_one(WeatherLocation, 25) |
| 245 | |
| 246 | def test_get_explicit_shard(self): |
| 247 | sess = self._fixture_data() |
nothing calls this directly
no test coverage detected