Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 4 support #52

Open
jayvdb opened this issue Dec 26, 2021 · 0 comments
Open

Django 4 support #52

jayvdb opened this issue Dec 26, 2021 · 0 comments

Comments

@jayvdb
Copy link

jayvdb commented Dec 26, 2021

For tests are failing instantiating middleware: TypeError: __init__() missing 1 required positional argument: 'get_response'

[   37s] ______ MessagesAssertionsMixin.test_assert_messages_sent_when_really_sent ______
[   37s] 
[   37s] self = <testproject.testapp.tests.test_assertions.MessagesAssertionsMixin testMethod=test_assert_messages_sent_when_really_sent>
[   37s] 
[   37s]     def test_assert_messages_sent_when_really_sent(self):
[   37s]         request = self.factory.get(data={'send': '3'})
[   37s]     
[   37s] >       self.view(request)
[   37s] 
[   37s] testapp/tests/test_assertions.py:132: 
[   37s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   37s] ../djet/testcases.py:62: in view
[   37s]     self._load_middleware()
[   37s] ../djet/testcases.py:88: in _load_middleware
[   37s]     self._load_old_middleware()
[   37s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   37s] 
[   37s] self = <testproject.testapp.tests.test_assertions.MessagesAssertionsMixin testMethod=test_assert_messages_sent_when_really_sent>
[   37s] 
[   37s]     def _load_old_middleware(self):
[   37s]         middleware_classes = self.middleware_classes or []
[   37s]         for mw_class in middleware_classes:
[   37s]             mw_class, mw_types = self._unpack_middleware(mw_class)
[   37s] >           mw_instance = mw_class()
[   37s] E           TypeError: __init__() missing 1 required positional argument: 'get_response'
[   37s] 
[   37s] ../djet/testcases.py:96: TypeError
[   37s] =============================== warnings summary ===============================
[   37s] ../../../../../../usr/lib/python3.9/site-packages/django/conf/__init__.py:199
[   37s]   /usr/lib/python3.9/site-packages/django/conf/__init__.py:199: RemovedInDjango50Warning: The default value of USE_TZ will change from False to True in Django 5.0. Set USE_TZ to False in your project settings if you want to keep the current default behavior.
[   37s]     warnings.warn(
[   37s] 
[   37s] -- Docs: https://docs.pytest.org/en/stable/warnings.html
[   37s] =========================== short test summary info ============================
[   37s] FAILED testapp/tests/test_assertions.py::MessagesAssertionsMixin::test_assert_messages_passes_when_matched_message
[   37s] FAILED testapp/tests/test_assertions.py::MessagesAssertionsMixin::test_assert_messages_raise_assertion_error_when_no_matching_message
[   37s] FAILED testapp/tests/test_assertions.py::MessagesAssertionsMixin::test_assert_messages_sent_when_not_sent
[   37s] FAILED testapp/tests/test_assertions.py::MessagesAssertionsMixin::test_assert_messages_sent_when_really_sent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant