mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
views: Use dedicated view when showing an app with operations
Closes: #2309. - This prevents processing of AppView when the app is being uninstalled. For at least two apps, this has failed because the AppView assumes that app and its dependencies are installed. - Use a dedicated template as well is simplify app template. Tests: - Installing and uninstalling an app works. - Refreshing the app page during uninstall does not lead to an error for samba and email apps. - Unit tests pass. - Functional tests for samba and email work. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
a94ebc567d
commit
d4b21ef1e4
5 files changed
+94
-49
No files matched your search
@@ -84,8 +84,9 @@ def make_request(request, view, as_admin=True, **kwargs):
|
||||
|
||||
def test_users_list_view(rf):
|
||||
"""Test that users list view has correct view data."""
|
||||
with patch('plinth.views.AppView.get_context_data',
|
||||
return_value={'is_enabled': True}):
|
||||
with (patch('plinth.views.AppView.get_context_data',
|
||||
return_value={'is_enabled': True}),
|
||||
patch('plinth.views.AppView.app', return_value=None)):
|
||||
view = views.UserList.as_view()
|
||||
response, messages = make_request(rf.get('/'), view)
|
||||
|
||||
|
||||
Reference in new issue
Block a user