| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | import pytest |
||
| 13 | @pytest.mark.django_db(transaction=False) |
||
| 14 | def test_valid_user_me_with_trailing_slash(inactive_test_user): |
||
| 15 | client = APIClient() |
||
| 16 | response = client.post('/users/activate/', { |
||
| 17 | 'uid': utils.encode_uid(inactive_test_user.pk), |
||
| 18 | 'token': default_token_generator.make_token(inactive_test_user) |
||
| 19 | }) |
||
| 20 | |||
| 21 | inactive_test_user.refresh_from_db() |
||
| 22 | assert inactive_test_user.is_active is True |
||
| 23 | assert response.status_code == status.HTTP_204_NO_CONTENT |
||
| 24 | |||
| 37 |
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.