mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2025-01-08 03:51:21 +00:00
076469a531
* [WIP] Add password length validation * Workaround: use click callback function * Minor rewording
20 lines
490 B
Python
20 lines
490 B
Python
import pytest
|
|
|
|
from eth2deposit.exceptions import ValidationError
|
|
from eth2deposit.utils.validation import validate_password_strength
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
'password, valid',
|
|
[
|
|
('12345678', True),
|
|
('1234567', False),
|
|
]
|
|
)
|
|
def test_validate_password_strength(password, valid):
|
|
if valid:
|
|
validate_password_strength(password=password)
|
|
else:
|
|
with pytest.raises(ValidationError):
|
|
validate_password_strength(password=password)
|