Skip to content

Commit

Permalink
Remove project/module from request
Browse files Browse the repository at this point in the history
With the refactoring in #193 and liqd/a4-meinberlin#893 the
project/module may be retrieved from the view directly.
  • Loading branch information
Johannes Dillmann committed Oct 12, 2017
1 parent 94a9532 commit 17baf27
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions adhocracy4/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,9 @@ def dispatch(self, request, *args, **kwargs):
"""Get this contexts project and module and validate them."""
module = self.get_module(*args, **kwargs)
self.module = module
self.request.module = module

project = self.get_project(*args, **kwargs)
self.project = project
self.request.project = project

if not project:
raise Http404()
Expand Down
6 changes: 0 additions & 6 deletions tests/projects/test_project_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def test_project_context_kwargs(rf, project):

assert response.content == b'project_context'
assert view.project == project
assert request.project == project


@pytest.mark.django_db
Expand All @@ -87,7 +86,6 @@ def test_project_context_url(rf, project):

assert response.content == b'project_context'
assert view.project == project
assert request.project == project


@pytest.mark.django_db
Expand All @@ -102,7 +100,6 @@ class FakeProjectContextViewUrlOverwrite(FakeProjectContextView):

assert response.content == b'project_context'
assert view.project == project
assert request.project == project


@pytest.mark.django_db
Expand All @@ -116,7 +113,6 @@ def get_object(self):

assert response.content == b'project_context'
assert view.project == project
assert request.project == project


@pytest.mark.django_db
Expand All @@ -130,7 +126,6 @@ def get_object(self):

assert response.content == b'project_context'
assert view.project == project
assert request.project == project


@pytest.mark.django_db
Expand All @@ -145,7 +140,6 @@ def get_project(self, *args, **kwargs):

assert response.content == b'project_context'
assert view.project == project
assert request.project == project


@pytest.mark.django_db
Expand Down

0 comments on commit 17baf27

Please sign in to comment.