Scaffolding for tests
This module provides utilities so that other projects can easily test their own implementations of cryptolib-related classes.
This is a provisional API, which may change without deprecation period, and which requires dependencies like pytest.
- wacryptolib.scaffolding.check_keystore_basic_get_set_api(keystore, readonly_keystore=None)
Test the workflow of getters/setters of the storage API, for uid-attached keys.
- wacryptolib.scaffolding.check_keystore_free_keys_api(keystore)
Test the storage regarding the precreation of "free keys", and their subsequent attachment to uids.
- wacryptolib.scaffolding.check_keystore_free_keys_concurrency(keystore)
Parallel tests to check the thread-safety of the storage regarding "free keys" booking.
- wacryptolib.scaffolding.check_sensor_state_machine(sensor, run_duration=0)
Check the proper start/stop/join behaviour of a sensor instance.