diff --git a/tests/test_box.py b/tests/test_box.py index bba6704..5193bec 100644 --- a/tests/test_box.py +++ b/tests/test_box.py @@ -17,7 +17,7 @@ import logging import unittest -from construct import Container +from construct import Container, ListContainer from pymp4.parser import Box log = logging.getLogger(__name__) @@ -89,13 +89,13 @@ def test_mdhd_build(self): def test_moov_build(self): moov = \ - Container(type="moov", children=[ # 96 bytes - Container(type="mvex", children=[ # 88 bytes + Container(type="moov", children=ListContainer([ # 96 bytes + Container(type="mvex", children=ListContainer([ # 88 bytes Container(type="mehd", version=0, flags=0, fragment_duration=0), # 16 bytes Container(type="trex", track_ID=1), # 32 bytes Container(type="trex", track_ID=2), # 32 bytes - ]) - ]) + ])) + ])) moov_data = Box.build(moov) @@ -141,9 +141,9 @@ def test_stsd_parse(self): type="stsd", version=0, flags=0, - entries=[ + entries=ListContainer([ Container(format='tx3g', data_reference_index=1, data=tx3g_data) - ], + ]), end=len(in_bytes) ) ) diff --git a/tests/test_util.py b/tests/test_util.py index d30ac3d..0e45347 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -17,7 +17,7 @@ import logging import unittest -from construct import Container +from construct import Container, ListContainer from pymp4.exceptions import BoxNotFound from pymp4.util import BoxUtil @@ -28,23 +28,23 @@ class BoxTests(unittest.TestCase): box_data = Container( type="demo", - children=[ + children=ListContainer([ Container(type="a ", id=1), Container(type="b ", id=2), Container( type="c ", - children=[ + children=ListContainer([ Container(type="a ", id=3), Container(type="b ", id=4) - ] + ]) ), Container(type="d ", id=5) - ] + ]) ) box_extended_data = Container( type="test", - children=[ + children=ListContainer([ Container( type="a ", id=1, @@ -55,7 +55,7 @@ class BoxTests(unittest.TestCase): id=2, extended_type=b"e--b" ) - ] + ]) ) def test_find(self): @@ -73,10 +73,10 @@ def test_find_after_nest(self): def test_find_nested_type(self): self.assertListEqual( list(BoxUtil.find(self.box_data, "c ")), - [Container(type="c ", children=[ + [Container(type="c ", children=ListContainer([ Container(type="a ", id=3), Container(type="b ", id=4), - ])] + ]))] ) def test_find_empty(self):