File: test_mapmessage.py

package info (click to toggle)
python-aristaproto 1.2%2B20240521-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,484 kB
  • sloc: python: 5,915; java: 106; xml: 84; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 356 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from tests.output_aristaproto.mapmessage import (
    Nested,
    Test,
)


def test_mapmessage_to_dict_preserves_message():
    message = Test(
        items={
            "test": Nested(
                count=1,
            )
        }
    )

    message.to_dict()

    assert isinstance(message.items["test"], Nested), "Wrong nested type after to_dict"