Пример #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)
Пример #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)
Пример #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)
Пример #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")
Пример #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)
Пример #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)
Пример #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)
Пример #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")