我目前正在使用django-rest-framework中的jwt令牌认证在django中编写自定义用户模型.在我的单元测试用例中,我收到此错误:
Creating test database for alias 'default'...
Destroying test database for alias 'default'...
E
======================================================================
ERROR: test_token_sign_in (edea.authentication.tests.tests.AuthenticationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Home\midoriiro\Programming\workspace\edea\edea\authentication\tests\tests.py", line 17, in test_token_sign_in
response = self.client.post(url, data, format='json')
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\rest_framework\test.py", line 170, in post
path, data=data, format=format, content_type=content_type, **extra)
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\rest_framework\test.py", line 92, in post
return self.generic('POST', path, data, content_type, **extra)
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\django\test\client.py", line 380, in generic
return self.request(**r)
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\rest_framework\test.py", …Run Code Online (Sandbox Code Playgroud)