@@ -30,6 +30,7 @@ from autopilot.platform import model
30from testtools.matchers import Equals, NotEquals
30from testtools.matchers import Equals, NotEquals
32import logging
32import logging
34logger = logging.getLogger(__name__)
35logger = logging.getLogger(__name__)
@@ -163,8 +164,8 @@ class ApplicationLifecycleTests(UnityTestCase):
165 @disable_qml_mocking
166 @disable_qml_mocking
166− def test_greeter_hides_on_app_focus(self):
167+ def test_greeter_hides_on_app_focus_via_upstart(self):
167− """Greeter should hide when an app is re-focused"""
168+ """Greeter should hide when an app is re-focused with upstart"""
168 unity_proxy = self.launch_unity()
169 unity_proxy = self.launch_unity()
169 unlock_unity(unity_proxy)
170 unlock_unity(unity_proxy)
@@ -184,7 +185,8 @@ class ApplicationLifecycleTests(UnityTestCase):
184 greeter = self.main_window.get_greeter()
185 greeter = self.main_window.get_greeter()
185 self.assertThat(greeter.created, Eventually(Equals(True)))
186 self.assertThat(greeter.created, Eventually(Equals(True)))
187− app = self._launch_app("messaging-app")
188+ command = ['initctl', 'start', 'application', 'APP_ID=messaging-app']
189+ subprocess.check_call(command)
188 self.assertThat(greeter.created, Eventually(Equals(False)))
190 self.assertThat(greeter.created, Eventually(Equals(False)))
189 self.assertThat(
191 self.assertThat(
190 self._get_current_focused_app_id(),
192 self._get_current_focused_app_id(),