File: exception_test.py

package info (click to toggle)
pyvlx 0.2.27-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,548 kB
  • sloc: python: 7,914; makefile: 39; sh: 5
file content (22 lines) | stat: -rw-r--r-- 798 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
"""Unit test for roller shutter."""
import unittest

from pyvlx.exception import PyVLXException


# pylint: disable=too-many-public-methods,invalid-name
class TestException(unittest.TestCase):
    """Test class for roller shutter."""

    def test_str(self):
        """Test string representation of PyVLXException."""
        exception = PyVLXException("fnord fnord")
        self.assertEqual(str(exception), '<PyVLXException description="fnord fnord" />')

    def test_str_with_parameter(self):
        """Test string representation of PyVLXException with parameter."""
        exception = PyVLXException("fnord fnord", fnord="fnord", bla="blub")
        self.assertEqual(
            str(exception),
            '<PyVLXException description="fnord fnord" bla="blub" fnord="fnord"/>',
        )