| Conditions | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import pytest |
||
| 34 | @pytest.mark.django_db(transaction=False) |
||
| 35 | def test_invalid_username_update_wrong_password(test_user): |
||
| 36 | client = APIClient() |
||
| 37 | client.force_login(test_user) |
||
| 38 | response = client.post( |
||
| 39 | '/user/{}'.format(User.USERNAME_FIELD), |
||
| 40 | {User.USERNAME_FIELD: 'test-new', 'current_password': 'invalid'} |
||
| 41 | ) |
||
| 42 | |||
| 43 | assert response.status_code == status.HTTP_400_BAD_REQUEST |
||
| 44 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.