File: frame_get_local_time_req_test.py

package info (click to toggle)
pyvlx 0.2.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,556 kB
  • sloc: python: 8,100; makefile: 38; sh: 5
file content (26 lines) | stat: -rw-r--r-- 957 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
"""Unit tests for FrameGetLocalTimeRequest."""
import unittest

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


class TestFrameGetLocalTimeRequest(unittest.TestCase):
    """Test class for FrameGetLocalTimeRequest."""

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

    def test_bytes(self):
        """Test FrameGetLocalTimeRequest with NO_TYPE."""
        frame = FrameGetLocalTimeRequest()
        self.assertEqual(bytes(frame), b"\x00\x03\x20\x04\x27")

    def test_frame_from_raw(self):
        """Test parse FrameGetLocalTimeRequest from raw."""
        frame = frame_from_raw(b"\x00\x03\x20\x04\x27")
        self.assertTrue(isinstance(frame, FrameGetLocalTimeRequest))

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