File: test_legacy_generic.py

package info (click to toggle)
python-plugwise 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,216 kB
  • sloc: xml: 92,497; python: 5,283; sh: 324; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 665 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, _api, _client = await self.connect_legacy_wrapper()
            setup_result = False  # pragma: no cover
        except pw_exceptions.InvalidXMLError:
            setup_result = True
        assert setup_result