File: frame_factory_default_req_test.py

package info (click to toggle)
pyvlx 0.2.28-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,552 kB
  • sloc: python: 7,915; makefile: 39; sh: 5
file content (28 lines) | stat: -rw-r--r-- 1,059 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
"""Unit tests for FrameGatewayFactoryDefaultRequest."""
import unittest

from pyvlx.api.frame_creation import frame_from_raw
from pyvlx.api.frames import FrameGatewayFactoryDefaultRequest


class TestFrameRebootRequest(unittest.TestCase):
    """Test class FrameGatewayFactoryDefaultRequest."""

    # pylint: disable=too-many-public-methods,invalid-name

    EXAMPLE_FRAME = b"\x00\x03\x00\x03\x00"

    def test_bytes(self):
        """Test FrameGatewayFactoryDefaultRequest."""
        frame = FrameGatewayFactoryDefaultRequest()
        self.assertEqual(bytes(frame), self.EXAMPLE_FRAME)

    def test_frame_from_raw(self):
        """Test parse FrameGatewayFactoryDefaultRequest from raw."""
        frame = frame_from_raw(self.EXAMPLE_FRAME)
        self.assertTrue(isinstance(frame, FrameGatewayFactoryDefaultRequest))

    def test_str(self):
        """Test string representation of FrameGatewayFactoryDefaultRequest."""
        frame = FrameGatewayFactoryDefaultRequest()
        self.assertEqual(str(frame), "<FrameGatewayFactoryDefaultRequest/>")