当前位置: 首页>>代码示例>>Python>>正文


Python Conference.addTrack方法代码示例

本文整理汇总了Python中MaKaC.conference.Conference.addTrack方法的典型用法代码示例。如果您正苦于以下问题:Python Conference.addTrack方法的具体用法?Python Conference.addTrack怎么用?Python Conference.addTrack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MaKaC.conference.Conference的用法示例。


在下文中一共展示了Conference.addTrack方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestRemoveTrackCoordinator

# 需要导入模块: from MaKaC.conference import Conference [as 别名]
# 或者: from MaKaC.conference.Conference import addTrack [as 别名]
class TestRemoveTrackCoordinator( unittest.TestCase ):
    """Tests different scenarios of the Remove Track Coord use case.
    """
    
    def setUp( self ):
        from MaKaC.user import Avatar
        cr = Avatar()
        cr.setId( "creator" )
        from MaKaC.conference import Conference, Track
        self._conf = Conference( cr )
        self._track1 = Track()
        self._track1.setId( "1" )
        self._conf.addTrack( self._track1 )
        
    def tearDown( self ):
        pass

    def testRemoveTC( self ):
        from MaKaC.user import Avatar
        tc1 = Avatar()
        tc1.setId( "tc1" )
        tc2 = Avatar()
        tc2.setId( "tc2" )
        self._track1.addCoordinator( tc1 )
        self._track1.addCoordinator( tc2 )
        self._track1.removeCoordinator( tc1 )
        self.assert_( tc1 not in self._track1.getCoordinatorList() )
        self.assert_( tc2 in self._track1.getCoordinatorList() )
        self.assert_( self._track1 not in self._conf.getCoordinatedTracks( tc1 ) )
        self.assert_( self._track1 in self._conf.getCoordinatedTracks( tc2 ) )
开发者ID:lukasnellen,项目名称:indico,代码行数:32,代码来源:testSciProgramme.py

示例2: TestContributionInclusion

# 需要导入模块: from MaKaC.conference import Conference [as 别名]
# 或者: from MaKaC.conference.Conference import addTrack [as 别名]
class TestContributionInclusion( unittest.TestCase ):
    
    def setUp( self ):
        from MaKaC.user import Avatar
        cr = Avatar()
        cr.setId( "creator" )
        from MaKaC.conference import Conference, Track
        self._conf = Conference( cr )
        self._track1 = Track()
        self._track1.setId( "1" )
        self._conf.addTrack( self._track1 )

    def test( self ):
        from MaKaC.conference import Contribution
        contrib1 = Contribution()
        self._conf.addContribution( contrib1 )
        self._track1.addContribution( contrib1 )
        self.assert_( self._track1.hasContribution( contrib1 ) )
        self.assert_( contrib1.getTrack() == track1 )
        self._track1.removeContribution( contrib1 )
        self.assert_( not self._track1.hasContribution( contrib1 ) )
        self.assert_( contrib1.getTrack() == None )
开发者ID:lukasnellen,项目名称:indico,代码行数:24,代码来源:testSciProgramme.py


注:本文中的MaKaC.conference.Conference.addTrack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。