File: test_legacy_generic.py

package info (click to toggle)
python-plugwise 1.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,080 kB
  • sloc: xml: 90,006; python: 5,344; sh: 326; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 667 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Test Plugwise module generic functionality."""

import pytest

from .test_init import TestPlugwise, pw_exceptions


class TestPlugwiseGeneric(TestPlugwise):  # pylint: disable=attribute-defined-outside-init
    """Tests for generic functionality."""

    @pytest.mark.asyncio
    async def test_fail_legacy_system(self):
        """Test erroneous legacy stretch system."""
        self.smile_setup = "faulty_stretch"
        try:
            _server, _smile, _client = await self.connect_legacy_wrapper()
            setup_result = False  # pragma: no cover
        except pw_exceptions.InvalidXMLError:
            setup_result = True
        assert setup_result