Esempio n. 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)
Esempio n. 2
0
	def testReturn(self):
		"""Ensure that the default action returns itself when recording"""
		x = BaseAction('x')
		self.failUnless(x.record() == x)
Esempio n. 3
0
	def testRaisesException(self):
		"""Ensure that record recorded exceptions are played back"""
		x = BaseAction('x')
		x.throws = Exception()
		self.failUnlessRaises(Exception, x.playback)