def test_challenge_failed(self): salt = b'salt' digest = hashlib.md5(b'message').digest() val = DigestValue(salt, digest, hashlib.md5) with pytest.raises(ValueError): val.challenge(b'm3ssage')
def test_challenge_success(self): salt = b'salt' digest = hashlib.md5(b'saltmessage').digest() val = DigestValue(salt, digest, hashlib.md5) val.challenge('message') val.challenge(b'message')