| Conditions | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import pytest |
||
| 10 | @pytest.mark.django_db(transaction=False) |
||
| 11 | def test_valid_user_delete_with_trailing_slash(test_user): |
||
| 12 | client = APIClient() |
||
| 13 | client.force_login(test_user) |
||
| 14 | response = client.delete( |
||
| 15 | '/user/', {'current_password': 'testing123'}, format='json' |
||
| 16 | ) |
||
| 17 | |||
| 18 | assert response.status_code == status.HTTP_204_NO_CONTENT |
||
| 19 | assert User.objects.count() == 0 |
||
| 20 | |||
| 31 | assert User.objects.count() == 0 |
||
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.