summaryrefslogtreecommitdiff
path: root/tests
diff options
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>2012-11-08 14:57:16 +0000
committerTarmac <>2012-11-08 14:57:16 +0000
commit9901c360477ffd63b35467e6cab86eb87f10dc26 (patch)
treedd387b23533490021c2410f820a875a952d50c11 /tests
parent98beb379d578e9572d3d354d36f272fa50f56ae7 (diff)
parent66124be68291b5bc29bd63ff3adafdd6b5d1e682 (diff)
The command lens autopilot tests were failing on non-EN locales, since there is no category with the name "Results" there. Let's use gettext.. Fixes: https://bugs.launchpad.net/bugs/1075898. Approved by Timo Jyrinki, MC Return.
(bzr r2882)
Diffstat (limited to 'tests')
-rw-r--r--tests/autopilot/unity/tests/test_command_lens.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/autopilot/unity/tests/test_command_lens.py b/tests/autopilot/unity/tests/test_command_lens.py
index 2f69d1ce3..13db7a2da 100644
--- a/tests/autopilot/unity/tests/test_command_lens.py
+++ b/tests/autopilot/unity/tests/test_command_lens.py
@@ -14,12 +14,14 @@ from time import sleep
from unity.tests import UnityTestCase
+import gettext
class CommandLensSearchTests(UnityTestCase):
"""Test the command lense search bahavior."""
def setUp(self):
super(CommandLensSearchTests, self).setUp()
+ gettext.install("unity-lens-applications")
def tearDown(self):
self.dash.ensure_hidden()
@@ -34,7 +36,7 @@ class CommandLensSearchTests(UnityTestCase):
self.keyboard.press_and_release("Delete")
self.assertThat(self.dash.search_string, Eventually(Equals("")))
- results_category = command_lens.get_category_by_name("Results")
+ results_category = command_lens.get_category_by_name(_("Results"))
self.assertThat(results_category.is_visible, Eventually(Equals(False)))
def test_results_category_appears(self):
@@ -44,7 +46,7 @@ class CommandLensSearchTests(UnityTestCase):
# lots of apps start with 'a'...
self.keyboard.type("a")
self.assertThat(self.dash.search_string, Eventually(Equals("a")))
- results_category = command_lens.get_category_by_name("Results")
+ results_category = command_lens.get_category_by_name(_("Results"))
self.assertThat(results_category.is_visible, Eventually(Equals(True)))
def test_result_category_actually_contains_results(self):
@@ -54,7 +56,7 @@ class CommandLensSearchTests(UnityTestCase):
# lots of apps start with 'a'...
self.keyboard.type("a")
self.assertThat(self.dash.search_string, Eventually(Equals("a")))
- results_category = command_lens.get_category_by_name("Results")
+ results_category = command_lens.get_category_by_name(_("Results"))
results = results_category.get_results()
self.assertTrue(results)