File: test_uninstall.py

package info (click to toggle)
pysmartapp 0.3.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 360 kB
  • sloc: python: 1,358; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download | duplicates (2)
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
"""Tests for the uninstall module."""

from pysmartapp.const import LIFECYCLE_UNINSTALL
from pysmartapp.uninstall import UninstallRequest

from .utilities import get_fixture


class TestUninstallRequest:
    """Tests for the UninstallRequest class."""

    @staticmethod
    def test_init():
        """Tests the init method."""
        # Arrange
        data = get_fixture('uninstall_request')
        # Act
        req = UninstallRequest(data)
        # Assert
        assert req.uninstall_data_raw == data['uninstallData']
        assert req.lifecycle == LIFECYCLE_UNINSTALL
        assert req.execution_id == data['executionId']
        assert req.locale == data['locale']
        assert req.version == data['version']
        assert req.installed_app_id == '8a0dcdc9-1ab4-4c60-9de7-cb78f59a1121'
        assert req.location_id == 'e675a3d9-2499-406c-86dc-8a492a886494'
        assert req.installed_app_config == \
            data['uninstallData']['installedApp']['config']
        assert req.settings == data['settings']