You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
response = self.post(
'admin_file',
{'name': 'fred', 'file[]': get_test_image()},
enctype='multipart/form-data'
)
Traceback (most recent call last):
File "/code/app/tests/tests_views.py", line 159, in test_upload_file
enctype='multipart/form-data'
File "/usr/local/lib/python3.6/site-packages/test_plus/test.py", line 142, in post
return self.request('post', url_name, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/test_plus/test.py", line 131, in request
self.last_response = method(reverse(url_name, args=args, kwargs=kwargs), data=data, follow=follow, **extra)
File "/usr/local/lib/python3.6/site-packages/django/urls/base.py", line 88, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 562, in _reverse_with_prefix
raise ValueError("Don't mix *args and **kwargs in call to reverse()!")
ValueError: Don't mix *args and **kwargs in call to reverse()!
#with reverse the same answer
response = self.post(
reverse('admin_file'),
{'name': 'fred', 'file[]': get_test_image()},
enctype='multipart/form-data'
)
ValueError: Don't mix *args and **kwargs in call to reverse()!
Hello, I am trying to test my . view
but i can`t make the correct request ,
# normal test
#with test plus
#with reverse the same answer
#without reverse and file in data
# with reverse works
Then why does not work without reverse ?
The text was updated successfully, but these errors were encountered: