|
3 | 3 | from doccano_client.models.user_details import PasswordChange |
4 | 4 |
|
5 | 5 |
|
6 | | -class TestPasswordChange: |
7 | | - def test_correct_password(self): |
8 | | - password_change = PasswordChange(new_password="foobarbaz", confirm_password="foobarbaz") |
9 | | - assert password_change.new_password == password_change.confirm_password |
10 | | - |
11 | | - def test_raise_error_with_short_password(self): |
12 | | - with pytest.raises(ValueError): |
13 | | - PasswordChange(new_password="f", confirm_password="f") |
14 | | - |
15 | | - def test_raise_error_with_long_password(self): |
16 | | - with pytest.raises(ValueError): |
17 | | - PasswordChange(new_password="f" * 129, confirm_password="f" * 129) |
18 | | - |
19 | | - def test_raise_error_if_new_password_does_not_match_confirm_password(self): |
20 | | - with pytest.raises(ValueError): |
21 | | - PasswordChange(new_password="foobarbaz", confirm_password="zabraboof") |
| 6 | +def test_correct_password(): |
| 7 | + password_change = PasswordChange(new_password="foobarbaz", confirm_password="foobarbaz") |
| 8 | + assert password_change.new_password == password_change.confirm_password |
| 9 | + |
| 10 | + |
| 11 | +def test_raise_error_with_short_password(): |
| 12 | + with pytest.raises(ValueError): |
| 13 | + PasswordChange(new_password="f", confirm_password="f") |
| 14 | + |
| 15 | + |
| 16 | +def test_raise_error_with_long_password(): |
| 17 | + with pytest.raises(ValueError): |
| 18 | + PasswordChange(new_password="f" * 129, confirm_password="f" * 129) |
| 19 | + |
| 20 | + |
| 21 | +def test_raise_error_if_new_password_does_not_match_confirm_password(): |
| 22 | + with pytest.raises(ValueError): |
| 23 | + PasswordChange(new_password="foobarbaz", confirm_password="zabraboof") |
0 commit comments