on xenial help sign in
Use subprocess.check_call when caling url-dispatcher, so an error will be raised if it fails.
commitc5cc48efdbbf5bddfa3d9c51b849bad71b7b3e7b authorLeo Arias <leo.arias@canonical.com> dateTue 15 Apr 2014, 12:46 (13 years ago) parent450b36db8d6e60
1 file changed+3−1
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py+3−1
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py+3−1
@@ -20,6 +20,7 @@
2020"""Test the integration with the URL dispatcher service."""
2121
2222import os
23+import subprocess
2324
2425from autopilot import platform
2526from autopilot.matchers import Eventually
@@ -70,7 +71,8 @@ MainView {
7071
7172 self.assertEqual('', self.main_window.get_current_focused_app_id())
7273 self.addCleanup(os.system, 'pkill qmlscene')
73− os.system('url-dispatcher application:///{}'.format(desktop_file_name))
74+ subprocess.check_call(
75+ ['url-dispatcher', 'application:///{}'.format(desktop_file_name)])
7476 self.assertThat(
7577 self.main_window.get_current_focused_app_id,
7678 Eventually(Equals(application_name)))