summaryrefslogtreecommitdiff
path: root/tests
diff options
authorThomi Richards <thomi.richards@canonical.com>2012-04-18 14:30:23 +1200
committerThomi Richards <thomi.richards@canonical.com>2012-04-18 14:30:23 +1200
commit6afac5b5a8237c52a3da1354955d77cf068ae229 (patch)
tree9baa693ed6e6d1891f7bcd3849251da2fc0e7cd8 /tests
parent3e43e90c22bbef18dbb29a44a7f6290960429484 (diff)
Cleaned up code after review.
(bzr r2220.7.7)
Diffstat (limited to 'tests')
-rw-r--r--tests/autopilot/autopilot/tests/test_hud.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/autopilot/autopilot/tests/test_hud.py b/tests/autopilot/autopilot/tests/test_hud.py
index d44d4d94d..b6ad70a72 100644
--- a/tests/autopilot/autopilot/tests/test_hud.py
+++ b/tests/autopilot/autopilot/tests/test_hud.py
@@ -117,11 +117,11 @@ class HudBehaviorTests(HudTestsBase):
def test_slow_tap_not_reveal_hud(self):
"""A slow tap must not reveal the HUD."""
- # This raises AssertionError since toggle_hud does a wait_for to check
- # that the hud opened or closed. Since it won't open or close when the
- # tap delay is too long, we expect that in our test:
- fn = lambda: self.hud.toggle_reveal(tap_delay=0.3)
- self.assertThat(fn, raises(AssertionError))
+ self.keybinding("hud/reveal", 0.3)
+ # need a long sleep to ensure that we test after the hud controller has
+ # seen the keypress.
+ sleep(5)
+ self.assertThat(self.hud.visible, Equals(False))
def test_alt_f4_doesnt_show_hud(self):
self.start_app('Calculator')