| Total Complexity | 1 |
| Total Lines | 9 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from django.test import TestCase |
||
| 9 | class JWTStrategyTestCase(TestCase): |
||
| 10 | def test_obtain_provides_valid_token_for_given_user(self): |
||
| 11 | user = create_user() |
||
| 12 | res = TokenStrategy.obtain(user) |
||
| 13 | self.assertEqual(res['user'], user) |
||
| 14 | |||
| 15 | data = {'token': res['token']} |
||
| 16 | serializer = VerifyJSONWebTokenSerializer(data=data) |
||
| 17 | self.assertTrue(serializer.is_valid()) |
||
| 18 |
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.