| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | import pytest |
||
| 26 | @pytest.mark.django_db(transaction=False) |
||
| 27 | def test_valid_user_me_without_trailing_slash(inactive_test_user): |
||
| 28 | client = APIClient() |
||
| 29 | response = client.post('/users/activate', { |
||
| 30 | 'uid': utils.encode_uid(inactive_test_user.pk), |
||
| 31 | 'token': default_token_generator.make_token(inactive_test_user) |
||
| 32 | }) |
||
| 33 | |||
| 34 | inactive_test_user.refresh_from_db() |
||
| 35 | assert inactive_test_user.is_active is True |
||
| 36 | assert response.status_code == status.HTTP_204_NO_CONTENT |
||
| 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.