Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)
Beispiel #4
0
 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")
Beispiel #5
0
 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)
Beispiel #6
0
 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)
Beispiel #7
0
 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)
Beispiel #8
0
 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")