Example #1
0
 def test_eager_loadable_poly(self):
     """should return false for polymorphic belongs to associations"""
     association = BelongsTo(target_klass=self.klass, id=self.id, polymorphic=True)
     self.assertEqual(association.eager_loadable(), False)
Example #2
0
 def test_eager_loadable(self):
     """should be eager_loadable when the moethods do not rely
     on instance data"""
     association = BelongsTo(target_klass=self.klass, id=self.id)
     self.assertEqual(True, association.eager_loadable())