mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2025-01-08 20:11:22 +00:00
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)
|