[pitivi] Fix test_async_done_not_received



commit 13d207ceddd88a120757a3c2fe95fde46799f0c4
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sat Jul 8 23:02:38 2017 +0200

    Fix test_async_done_not_received
    
    Should have been part of 52b390422ecc19edc58f824ca39285a0c8306037

 tests/test_pipeline.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index b54ffb8..7cd15a7 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -117,9 +117,11 @@ class TestPipeline(common.TestCase):
         # The pipeline should have tried to seek back to the last position.
         self.assertEqual(pipe._next_seek, 0)
 
-        # Pretend the state change async operation finished.
+        # Pretend the state change (to PAUSED) async operation succeeded.
         message.type = Gst.MessageType.ASYNC_DONE
-        pipe._busMessageCb(None, message)
+        with mock.patch.object(pipe, "get_state") as get_state:
+            get_state.return_value = (0, Gst.State.PAUSED, 0)
+            pipe._busMessageCb(None, message)
         self.assertEqual(pipe._recovery_state, SimplePipeline.RecoveryState.NOT_RECOVERING)
         # Should still be busy because of seeking to _next_seek.
         self.assertTrue(pipe._busy_async)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]