Exemple #1
0
	def testPlaybackMechanism(self):
		"""Ensure taht playback is tracked"""
		x = BaseAction('x')
		self.failIf(x.playbackPolicy.hasBeenPlayedBack)
		self.failIf(x.playbackPolicy.isReadyForRemoval)
		x.playback()
		self.failUnless(x.playbackPolicy.hasBeenPlayedBack)
		self.failUnless(x.playbackPolicy.isReadyForRemoval)
Exemple #2
0
	def testReturn(self):
		"""Ensure that the default action returns itself when recording"""
		x = BaseAction('x')
		self.failUnless(x.record() == x)
Exemple #3
0
	def testRaisesException(self):
		"""Ensure that record recorded exceptions are played back"""
		x = BaseAction('x')
		x.throws = Exception()
		self.failUnlessRaises(Exception, x.playback)