File: test_mapmessage.py

package info (click to toggle)
python-aristaproto 1.2%2Breally0.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,600 kB
  • sloc: python: 6,521; java: 106; xml: 84; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 356 bytes parent folder | download | duplicates (4)
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"