python: Avoid warning about using deprecated methods
authorThibault Saunier <tsaunier@igalia.com>
Sat, 4 May 2019 14:47:07 +0000 (10:47 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Sat, 4 May 2019 14:47:27 +0000 (10:47 -0400)
Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/69

bindings/python/gi/overrides/GES.py
tests/check/python/test_timeline.py

index 631e931..af51e61 100644 (file)
@@ -70,7 +70,7 @@ class TimelineElement(GES.TimelineElement):
         )
 
     def set_child_property(self, prop_name, prop_value):
-        res, child, unused_pspec = self.lookup_child(prop_name)
+        res, child, unused_pspec = GES.TimelineElement.lookup_child(self, prop_name)
         if not res:
             return res
 
index 67905b0..ded93f3 100644 (file)
@@ -935,3 +935,12 @@ class TestPriorities(common.GESSimpleTimelineTest):
         clip.props.start = 101
         self.timeline.commit()
         self.assertGreater(clip.props.priority, clip1.props.priority)
+
+
+class TestTimelineElement(common.GESSimpleTimelineTest):
+
+    def test_set_child_property(self):
+        clip = self.add_clip(0, 0, 100)
+        source = clip.find_track_element(None, GES.VideoSource)
+        self.assertTrue(source.set_child_property("height", 5))
+        self.assertEqual(clip.get_child_property("height"), (True, 5))