Merge lp:~canonical-platform-qa/dialer-app/fix1349582-number_format into lp:dialer-app

Proposed by Leo Arias
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 200
Merged at revision: 202
Proposed branch: lp:~canonical-platform-qa/dialer-app/fix1349582-number_format
Merge into: lp:dialer-app
Diff against target: 69 lines (+23/-10)
1 file modified
tests/autopilot/dialer_app/tests/__init__.py (+23/-10)
To merge this branch: bzr merge lp:~canonical-platform-qa/dialer-app/fix1349582-number_format
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Chris Gagnon (community) Needs Fixing
Review via email: mp+228580@code.launchpad.net

Commit message

Set up the locale for autopilot tests.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

I'd like these tests use the same code formatting standard as the autopilot project (see code comments)

I'd also like to see the tests pass before approving

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
200. By Leo Arias

Follow the autopilot style for closing parentheses.

Revision history for this message
Leo Arias (elopio) wrote :

> I'd like these tests use the same code formatting standard as the autopilot
> project (see code comments)
>
> I'd also like to see the tests pass before approving

Done. And all the tests passing now. Which is a little weird as there's another open bug, I'll take a look there. But anyway, all the tests I touched here are now passing, which is good.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

Ok, these results make more sense. The only remaining failures is fixed here:
https://code.launchpad.net/~canonical-platform-qa/dialer-app/fix1349641-swipe_recent/+merge/228594

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
No, but the problem is fixed in a separate MR.

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/dialer_app/tests/__init__.py'
2--- tests/autopilot/dialer_app/tests/__init__.py 2014-06-19 17:26:34 +0000
3+++ tests/autopilot/dialer_app/tests/__init__.py 2014-07-29 23:43:51 +0000
4@@ -9,13 +9,17 @@
5
6 """Dialer App autopilot tests."""
7
8+import fixtures
9 from autopilot.input import Mouse, Touch, Pointer
10 from autopilot.introspection import get_proxy_object_for_existing_process
11 from autopilot.matchers import Eventually
12 from autopilot.platform import model
13 from autopilot.testcase import AutopilotTestCase
14 from testtools.matchers import Equals
15-from ubuntuuitoolkit import emulators as toolkit_emulators
16+from ubuntuuitoolkit import (
17+ emulators as toolkit_emulators,
18+ fixture_setup
19+)
20 from dialer_app import emulators
21 from dialer_app import helpers
22
23@@ -53,6 +57,8 @@
24 self.pointing_device = Pointer(self.input_device_class.create())
25 super(DialerAppTestCase, self).setUp()
26
27+ self.set_up_locale()
28+
29 if os.path.exists(self.local_location):
30 self.launch_test_local()
31 else:
32@@ -60,21 +66,28 @@
33
34 self.assertThat(self.main_view.visible, Eventually(Equals(True)))
35
36+ def set_up_locale(self):
37+ # We set up the language to english to check the formatting of the
38+ # dialed number.
39+ self.useFixture(
40+ fixtures.EnvironmentVariable('LANGUAGE', newvalue='en')
41+ )
42+ self.useFixture(
43+ fixture_setup.InitctlEnvironmentVariable(LANGUAGE='en')
44+ )
45+
46 def launch_test_local(self):
47 self.app = self.launch_test_application(
48 self.local_location,
49 app_type='qt',
50- emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
51+ emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase
52+ )
53
54 def launch_test_installed(self):
55- if model() == 'Desktop':
56- self.app = self.launch_test_application(
57- "dialer-app",
58- emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
59- else:
60- self.app = self.launch_upstart_application(
61- "dialer-app",
62- emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
63+ self.app = self.launch_upstart_application(
64+ 'dialer-app',
65+ emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase
66+ )
67
68 def _get_app_proxy_object(self, app_name):
69 return get_proxy_object_for_existing_process(

Subscribers

People subscribed via source and target branches