def test_sha206a_api_init_live(test_init_with_device): """ Use real hardware for these tests - otherwise skip """ load_cryptoauthlib() if Status.ATCA_SUCCESS != atcab_init(cfg_atsha20xa_kithid_default()): raise Exception('Unable to connect to a device')
def test_jwt_init_live(test_init_with_device): """ Use real hardware for these tests - otherwise skip """ load_cryptoauthlib() if Status.ATCA_SUCCESS != atcab_init(__config): raise Exception('Unable to connect to a device') # Check device type info = bytearray(4) assert Status.ATCA_SUCCESS == atcab_info(info) dev_type = get_device_type_id(get_device_name(info)) if dev_type != __config.devtype: __config.devtype = dev_type assert Status.ATCA_SUCCESS == atcab_release() time.sleep(1) assert Status.ATCA_SUCCESS == atcab_init(__config)
def test_init(): load_cryptoauthlib(atcab_mock())
def test_jwt_init(): """ Run tests against the library mock """ load_cryptoauthlib(atcab_mock())
def test_iface_init(test_init_with_lib): load_cryptoauthlib()
def test_sha206a_api_init_lib(test_init_with_lib): """ Run tests against a built library on the platform """ load_cryptoauthlib()
def test_library(): inst = atcab_mock() load_cryptoauthlib(inst) assert get_cryptoauthlib() == inst
def test_library_load_dll(test_init_with_lib): load_cryptoauthlib()
def test_atcacert_init_lib(test_init_with_lib): """ Run tests against a built library on the platform """ load_cryptoauthlib()