@@ -20,7 +20,6 @@
21from __future__ import absolute_import
21from __future__ import absolute_import
23−from unity8.shell import with_lightdm_mock
24from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
23from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
26from autopilot.matchers import Eventually
25from autopilot.matchers import Eventually
@@ -41,9 +40,10 @@ class TestLockscreen(UnityTestCase):
42 scenarios = _get_device_emulation_scenarios()
41 scenarios = _get_device_emulation_scenarios()
44− @with_lightdm_mock("single-pin")
45 def test_can_unlock_pin_screen(self):
43 def test_can_unlock_pin_screen(self):
46 """Must be able to unlock the PIN entry lock screen."""
44 """Must be able to unlock the PIN entry lock screen."""
46+ self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-pin"
47 self.launch_unity()
47 self.launch_unity()
48 greeter = self.main_window.get_greeter()
48 greeter = self.main_window.get_greeter()
@@ -56,9 +56,10 @@ class TestLockscreen(UnityTestCase):
56 self._enter_prompt_passphrase("1234\n")
56 self._enter_prompt_passphrase("1234\n")
57 self.assertThat(greeter.shown, Eventually(Equals(False)))
57 self.assertThat(greeter.shown, Eventually(Equals(False)))
59− @with_lightdm_mock("single-passphrase")
60 def test_can_unlock_passphrase_screen(self):
59 def test_can_unlock_passphrase_screen(self):
61 """Must be able to unlock the passphrase entry screen."""
60 """Must be able to unlock the passphrase entry screen."""
62+ self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
62 self.launch_unity()
63 self.launch_unity()
63 greeter = self.main_window.get_greeter()
64 greeter = self.main_window.get_greeter()
@@ -71,9 +72,9 @@ class TestLockscreen(UnityTestCase):
71 self._enter_prompt_passphrase("password")
72 self._enter_prompt_passphrase("password")
72 self.assertThat(greeter.shown, Eventually(Equals(False)))
73 self.assertThat(greeter.shown, Eventually(Equals(False)))
74− @with_lightdm_mock("single-pin")
75 def test_pin_screen_wrong_code(self):
75 def test_pin_screen_wrong_code(self):
76 """Entering the wrong pin code must not dismiss the lock screen."""
76 """Entering the wrong pin code must not dismiss the lock screen."""
77+ self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-pin"
77 self.launch_unity()
78 self.launch_unity()
78 greeter = self.main_window.get_greeter()
79 greeter = self.main_window.get_greeter()
@@ -90,9 +91,9 @@ class TestLockscreen(UnityTestCase):
90 self.assertThat(prompt.text, Eventually(Equals("")))
91 self.assertThat(prompt.text, Eventually(Equals("")))
91 self.assertThat(greeter.shown, Eventually(Equals(True)))
92 self.assertThat(greeter.shown, Eventually(Equals(True)))
93− @with_lightdm_mock("single-passphrase")
94 def test_passphrase_screen_wrong_password(self):
94 def test_passphrase_screen_wrong_password(self):
95 """Entering the wrong password must not dismiss the lock screen."""
95 """Entering the wrong password must not dismiss the lock screen."""
96+ self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
96 self.launch_unity()
97 self.launch_unity()
97 greeter = self.main_window.get_greeter()
98 greeter = self.main_window.get_greeter()