def bcrypt_set_password(self, raw_password):
    if not is_enabled() or raw_password is None:
        _set_password(self, raw_password)
    else:
        salt = bcrypt.gensalt(get_rounds())
        self.password = 'bc$' + bcrypt.hashpw(smart_str(raw_password), salt)
this test is drawn from Crassidis [1], example 4.6.
dataset/ETHPy150Open dwaiter/django-bcrypt/django_bcrypt/models.py/bcrypt_set_password--crossover with--dataset/ETHPy150Open rlabbe/filterpy/filterpy/kalman/tests/test_imm.py/test_imm