From fae88d9fff1b7b0d553fdba3160c25fd66b1cbb1 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 16 Oct 2021 07:57:11 -0400 Subject: [PATCH] infinoted: Use BaseAppTests for functional tests Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- .../infinoted/tests/test_functional.py | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/plinth/modules/infinoted/tests/test_functional.py b/plinth/modules/infinoted/tests/test_functional.py index 15c8c42d2..34bd578f8 100644 --- a/plinth/modules/infinoted/tests/test_functional.py +++ b/plinth/modules/infinoted/tests/test_functional.py @@ -5,26 +5,12 @@ Functional, browser based tests for infinoted app. import pytest -from plinth.tests import functional +from plinth.tests.functional import BaseAppTests pytestmark = [pytest.mark.apps, pytest.mark.infinoted] -@pytest.fixture(scope='module', autouse=True) -def fixture_background(session_browser): - """Login and install the app.""" - functional.login(session_browser) - functional.install(session_browser, 'infinoted') - yield - functional.app_disable(session_browser, 'infinoted') - - -def test_enable_disable(session_browser): - """Test enabling the app.""" - functional.app_disable(session_browser, 'infinoted') - - functional.app_enable(session_browser, 'infinoted') - assert functional.service_is_running(session_browser, 'infinoted') - - functional.app_disable(session_browser, 'infinoted') - assert functional.service_is_not_running(session_browser, 'infinoted') +class TestInfinotedApp(BaseAppTests): + app_name = 'infinoted' + has_service = True + has_web = False