def suite():
<EOL>hsm = pyhsm.YHSM(device = os.getenv('<STR_LIT>', '<STR_LIT>'))<EOL>try:<EOL><INDENT>hsm.unlock("<STR_LIT>")<EOL><DEDENT>except pyhsm.exception.YHSM_CommandFailed as e:<EOL><INDENT>if hsm.version.have_key_store_decrypt():<EOL><INDENT>if e.status != pyhsm.defines.YSM_MISMATCH:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if e.status != pyhsm.defines.YSM_KEY_STORAGE_LOCKED ande.status != pyhsm.defines.YSM_FUNCTION_DISABLED:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>tests = []<EOL>if os.environ.get('<STR_LIT>'):<EOL><INDENT>tests.append(unittest.TestLoader().loadTestsFromModule(configure_hsm))<EOL><DEDENT>tests += [unittest.TestLoader().loadTestsFromModule(this) for this in test_modules]<EOL>return unittest.TestSuite(tests)<EOL>
Create a test suite with all our tests.

If the OS environment variable 'YHSM_ZAP' is set and evaluates to true,
we will include the special test case class that erases the current
YubiHSM config and creates a new one with known keys to be used by the
other tests. NOTE that this is ONLY POSSIBLE if the YubiHSM is already
in DEBUG mode.