def testOnePlaybacksIsTheDefault(self): """Ensure that we must play back at least once""" policy = MinimumPlaybackPolicy() self.failIf(policy.hasBeenPlayedBack) self.failIf(policy.isReadyForRemoval) policy.playback() self.failUnless(policy.hasBeenPlayedBack) self.failIf(policy.isReadyForRemoval)
def testVerifyArbitraryLimits(self): """Ensure that we can require arbitrary minimum playback limits""" policy = MinimumPlaybackPolicy(3) for x in range(0, 3): self.failIf(policy.hasBeenPlayedBack) self.failIf(policy.isReadyForRemoval) policy.playback() self.failUnless(policy.hasBeenPlayedBack) self.failIf(policy.isReadyForRemoval)