def test_primary_key_always_loaded(self): self.prop.key = "pk1" load = defer_everything_but(self.mapper, self.load, *self.required_columns) self.assertFalse(load.defer.called)
def test_plain_column_not_called(self): self.prop.key = "key" load = defer_everything_but(self.mapper, self.load, *self.required_columns) self.assertFalse(load.defer.called)
def test_position_column(self): self.prop.key = "position" load = defer_everything_but(self.mapper, self.load, *self.required_columns) self.assertFalse(load.defer.called)
def test_plain_column_called(self): self.prop.key = "foo" load = defer_everything_but(self.mapper, self.load, *self.required_columns) load.defer.assert_called_once_with("foo")