20 lines
519 B
Python
20 lines
519 B
Python
import os
|
|
import sys
|
|
|
|
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
|
if ROOT not in sys.path:
|
|
sys.path.insert(0, ROOT)
|
|
|
|
from pymsc.core.introspection import structure_to_dict
|
|
from pymsc.lib1553.messages.a3_graphic_setting import MsgA3Payload
|
|
|
|
|
|
def test_structure_to_dict_a3():
|
|
obj = MsgA3Payload()
|
|
obj.graphic_order = 9
|
|
obj.time_to_go = 123
|
|
d = structure_to_dict(obj)
|
|
assert isinstance(d, dict)
|
|
assert d.get('graphic_order') == 9
|
|
assert d.get('time_to_go') == 123
|