Conditions | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import pytest |
||
22 | @pytest.mark.django_db(transaction=False) |
||
23 | def test_valid_user_create_without_trailing_slash(): |
||
24 | client = APIClient() |
||
25 | response = client.post('/users', { |
||
26 | User.USERNAME_FIELD: 'test@localhost', |
||
27 | 'password': 'testing123', |
||
28 | }) |
||
29 | |||
30 | assert response.status_code == status.HTTP_201_CREATED |
||
31 | assert response.json() == {User.USERNAME_FIELD: 'test@localhost', 'id': 1} |
||
32 |
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.