summaryrefslogtreecommitdiff
diff options
authorŁukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>2013-05-21 14:04:59 +0200
committerŁukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>2013-05-21 14:04:59 +0200
commitff7c1c0c9b59d02c46f9246e71b2ab8d2ba836d9 (patch)
treef61b99b14e05263ca776343e95c109ca89b0b844
parent2b08d12f65a6362bb360fb689c8280c4045df192 (diff)
Fix the test_app_activate_on_enter in the same way
(bzr r3335.1.3)
-rw-r--r--tests/autopilot/unity/tests/test_hud.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/autopilot/unity/tests/test_hud.py b/tests/autopilot/unity/tests/test_hud.py
index 8dd4141fe..b8916e4c8 100644
--- a/tests/autopilot/unity/tests/test_hud.py
+++ b/tests/autopilot/unity/tests/test_hud.py
@@ -323,7 +323,13 @@ class HudBehaviorTests(HudTestsBase):
self.keyboard.type("Quit")
self.assertThat(self.unity.hud.search_string, Eventually(Equals("Quit")))
- hud_query_check = lambda: self.unity.hud.selected_hud_button.label_no_formatting
+
+ def hud_query_check():
+ button = self.unity.hud.selected_hud_button
+ if not button:
+ return
+ return button.label_no_formatting
+
self.assertThat(hud_query_check,
Eventually(Equals(u'Quit\u2002(File)'), timeout=30))