def testRecord(self): """Verify recording of a new action""" c = Controller() action = BaseAction('x') c.record(action) self.failUnless(c.actions.contains(action)) self.failUnless(c.actionUnderConstruction == action)
def testSetCount(self): """Verify that settting the count works""" c = Controller() a = BaseAction('x') c.record(a) self.failUnless(a.playbackPolicy.remaining == 1) c.setCount(2) self.failUnless(a.playbackPolicy.remaining == 2)
def testPlaybackWithMultipleCounts(self): """Perform playback with multiple values""" c = Controller() action = BaseAction('x') c.record(action) c.setCount(2) self.failIf(action.playbackPolicy.hasBeenPlayedBack) self.failIf(action.playbackPolicy.isReadyForRemoval) c.playback(action) self.failIf(action.playbackPolicy.hasBeenPlayedBack) self.failIf(action.playbackPolicy.isReadyForRemoval) c.playback(action) self.failUnless(action.playbackPolicy.hasBeenPlayedBack) self.failUnless(action.playbackPolicy.isReadyForRemoval)
def testPlaybackIsUnlimited(self): """Verify that unlimited playback settings are correctly reported""" c = Controller() a = BaseAction('x') c.record(a)