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')
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")
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')
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")