Table of Contents

Class: TestILockable test/testComponents.py

Test ILockable components: subclass and supply two things for each lock components you need to test.

self.component = pub.components.Lock() self.component.keys = [self.key]

Base Classes   
TestCase
Methods   
setUp
testLockDone
testLockFailLocked
testLockFailNoKey
testUnlockDone
testUnlockFailNoKey
testUnlockFailNotLocked
  setUp 
setUp ( self )

  testLockDone 
testLockDone ( self )

check that you can lock the obj

  testLockFailLocked 
testLockFailLocked ( self )

check that you can't lock what is locked

  testLockFailNoKey 
testLockFailNoKey ( self )

check that not having the key returns an error

  testUnlockDone 
testUnlockDone ( self )

check that the object can be unlocked

  testUnlockFailNoKey 
testUnlockFailNoKey ( self )

check that not having the key returns an error

  testUnlockFailNotLocked 
testUnlockFailNotLocked ( self )

check that you can't unlock what is not locked


Table of Contents

This document was automatically generated on Mon Aug 8 17:04:09 2005 by HappyDoc version 2.1