File: test_functional.py

package info (click to toggle)
freedombox 26.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 82,976 kB
  • sloc: python: 48,504; javascript: 1,736; xml: 481; makefile: 290; sh: 167; php: 32
file content (35 lines) | stat: -rw-r--r-- 1,202 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Functional, browser based tests for matrixsynapse app.
"""

import pytest

from plinth.tests import functional

pytestmark = [pytest.mark.apps, pytest.mark.matrixsynapse]


class TestMatrixSynapseApp(functional.BaseAppTests):
    app_name = 'matrixsynapse'
    has_service = True
    has_web = False
    diagnostics_delay = 1

    @pytest.fixture(scope='class', autouse=True)
    def fixture_setup(self, session_browser):
        """Setup the app."""
        functional.login(session_browser)
        functional.domain_add(session_browser, 'mydomain.example')

    def install_and_setup(self, session_browser):
        """Install the app and run setup."""
        super().install_and_setup(session_browser)
        functional.app_select_domain_name(session_browser, self.app_name,
                                          'mydomain.example')

    def test_uninstall(self, session_browser):
        """After uninstall test, after installing select the domain again."""
        super().test_uninstall(session_browser)
        functional.app_select_domain_name(session_browser, self.app_name,
                                          'mydomain.example')