mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-23 15:38:08 +00:00
Fix constructor arguments to SessionMiddleware in tests
This commit is contained in:
parent
1f8ba4df3e
commit
e1fd57a1d6
2 changed files with 5 additions and 5 deletions
|
@ -78,7 +78,7 @@ class DeleteUserViews(TestCase):
|
|||
form.data["password"] = "password"
|
||||
request = self.factory.post("", form.data)
|
||||
request.user = self.local_user
|
||||
middleware = SessionMiddleware()
|
||||
middleware = SessionMiddleware(request)
|
||||
middleware.process_request(request)
|
||||
request.session.save()
|
||||
|
||||
|
@ -105,7 +105,7 @@ class DeleteUserViews(TestCase):
|
|||
view = views.DeactivateUser.as_view()
|
||||
request = self.factory.post("")
|
||||
request.user = self.local_user
|
||||
middleware = SessionMiddleware()
|
||||
middleware = SessionMiddleware(request)
|
||||
middleware.process_request(request)
|
||||
request.session.save()
|
||||
|
||||
|
@ -137,7 +137,7 @@ class DeleteUserViews(TestCase):
|
|||
form.data["password"] = "password"
|
||||
request = self.factory.post("", form.data)
|
||||
request.user = self.local_user
|
||||
middleware = SessionMiddleware()
|
||||
middleware = SessionMiddleware(request)
|
||||
middleware.process_request(request)
|
||||
request.session.save()
|
||||
|
||||
|
@ -159,7 +159,7 @@ class DeleteUserViews(TestCase):
|
|||
form.data["password"] = "password"
|
||||
request = self.factory.post("", form.data)
|
||||
request.user = self.local_user
|
||||
middleware = SessionMiddleware()
|
||||
middleware = SessionMiddleware(request)
|
||||
middleware.process_request(request)
|
||||
request.session.save()
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ class ViewsHelpers(TestCase):
|
|||
|
||||
request = self.factory.post("", form.data)
|
||||
request.user = self.local_user
|
||||
middleware = SessionMiddleware()
|
||||
middleware = SessionMiddleware(request)
|
||||
middleware.process_request(request)
|
||||
request.session.save()
|
||||
|
||||
|
|
Loading…
Reference in a new issue