I couldn't figure out if this should be a discussion group question of a
Github issue... Thank you in advance.
Steps to reproduce
python manage.py test --noinput alloy.modules.super_tester
class SuperTester(APITestCase):
def test1(self):
client = APIClient()
data = client.get('/')
print(data)
Expected behavior
I expect to see the data of the json that the get request produces.
This used to work and all my integration tests were passing.
Actual behavior
======================================================================
ERROR: test1 (alloy.modules.super_tester.SuperTester)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/alloy/modules/super_tester.py", line
15, in test1
data = client.get('/')
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/rest_framework/test.py",
line 282, in get
response = super(APIClient, self).get(path, data=data, **extra)
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/rest_framework/test.py",
line 208, in get
return self.generic('GET', path, **r)
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/django/test/client.py",
line 416, in generic
return self.request(**r)
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/rest_framework/test.py",
line 279, in request
return super(APIClient, self).request(**kwargs)
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/rest_framework/test.py",
line 231, in request
request = super(APIRequestFactory, self).request(**kwargs)
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/django/test/client.py",
line 483, in request
response = self.handler(environ)
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/django/test/client.py",
line 131, in __call__
self.load_middleware()
File
"/Users/Jacob/Dropbox/Github/edu-chat-core/educhatenv/lib/python3.6/site-packages/django/core/handlers/base.py",
line 82, in load_middleware
mw_instance = middleware(handler)
TypeError: __init__() takes 1 positional argument but 2 were given
asdfadsfasf
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.