コード例 #1
0
ファイル: association_test.py プロジェクト: tpett/pyperry
 def test_source_option(self):
     """
     should use the source option as the target association name if provided
     """
     association = HasManyThrough(target_klass=self.Site, id='dumb_comments',
                                  through='articles', source='comments')
     self.assertEqual(association.source_association().id, 'comments')
コード例 #2
0
ファイル: association_test.py プロジェクト: jbgo/pyperry
 def test_source_option(self):
     """
     should use the source option as the target association name if provided
     """
     association = HasManyThrough(self.Site, "dumb_comments", through="articles", source="comments")
     self.assertEqual(association.source_association().id, "comments")
コード例 #3
0
ファイル: association_test.py プロジェクト: tpett/pyperry
 def test_association_name(self):
     """should use the source association that matches the association id"""
     association = HasManyThrough(target_klass=self.Site, id='comments',
             through='articles')
     self.assertEqual(association.source_association().id, 'comments')
コード例 #4
0
ファイル: association_test.py プロジェクト: jbgo/pyperry
 def test_association_name(self):
     """should use the source association that matches the association id"""
     association = HasManyThrough(self.Site, "comments", through="articles")
     self.assertEqual(association.source_association().id, "comments")