From 6358d4fcd346471ee028acaaf214396ca0c503cf Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 16 Oct 2021 09:18:42 -0400 Subject: [PATCH] roundcube: Use BaseAppTests for functional tests Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- .../roundcube/tests/test_functional.py | 34 ++++--------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/plinth/modules/roundcube/tests/test_functional.py b/plinth/modules/roundcube/tests/test_functional.py index e88220190..1737f5fc8 100644 --- a/plinth/modules/roundcube/tests/test_functional.py +++ b/plinth/modules/roundcube/tests/test_functional.py @@ -4,35 +4,13 @@ Functional, browser based tests for roundcube app. """ import pytest -from plinth.tests import functional + +from plinth.tests.functional import BaseAppTests pytestmark = [pytest.mark.apps, pytest.mark.roundcube] -@pytest.fixture(scope='module', autouse=True) -def fixture_background(session_browser): - """Login and install the app.""" - functional.login(session_browser) - functional.install(session_browser, 'roundcube') - yield - functional.app_disable(session_browser, 'roundcube') - - -def test_enable_disable(session_browser): - """Test enabling the app.""" - functional.app_disable(session_browser, 'roundcube') - - functional.app_enable(session_browser, 'roundcube') - assert functional.is_available(session_browser, 'roundcube') - - functional.app_disable(session_browser, 'roundcube') - assert not functional.is_available(session_browser, 'roundcube') - - -@pytest.mark.backups -def test_backup_restore(session_browser): - """Test backup and restore.""" - functional.app_enable(session_browser, 'roundcube') - functional.backup_create(session_browser, 'roundcube', 'test_roundcube') - functional.backup_restore(session_browser, 'roundcube', 'test_roundcube') - assert functional.is_available(session_browser, 'roundcube') +class TestRoundcubeApp(BaseAppTests): + app_name = 'roundcube' + has_service = False + has_web = True