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

Chris Gagnon chris.gagnon at canonical.com
Tue Jul 29 15:45:47 UTC 2014


Review: Needs Fixing

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


Diff comments:

> === modified file 'tests/autopilot/dialer_app/tests/__init__.py'
> --- tests/autopilot/dialer_app/tests/__init__.py	2014-06-19 17:26:34 +0000
> +++ tests/autopilot/dialer_app/tests/__init__.py	2014-07-28 21:41:50 +0000
> @@ -9,13 +9,17 @@
>  
>  """Dialer App autopilot tests."""
>  
> +import fixtures
>  from autopilot.input import Mouse, Touch, Pointer
>  from autopilot.introspection import get_proxy_object_for_existing_process
>  from autopilot.matchers import Eventually
>  from autopilot.platform import model
>  from autopilot.testcase import AutopilotTestCase
>  from testtools.matchers import Equals
> -from ubuntuuitoolkit import emulators as toolkit_emulators
> +from ubuntuuitoolkit import (
> +    emulators as toolkit_emulators,
> +    fixture_setup
> +)
>  from dialer_app import emulators
>  from dialer_app import helpers
>  
> @@ -53,6 +57,8 @@
>          self.pointing_device = Pointer(self.input_device_class.create())
>          super(DialerAppTestCase, self).setUp()
>  
> +        self.set_up_locale()
> +
>          if os.path.exists(self.local_location):
>              self.launch_test_local()
>          else:
> @@ -60,6 +66,14 @@
>  
>          self.assertThat(self.main_view.visible, Eventually(Equals(True)))
>  
> +    def set_up_locale(self):
> +        # We set up the language to english to check the formatting of the
> +        # dialed number.
> +        self.useFixture(
> +            fixtures.EnvironmentVariable('LANGUAGE', newvalue='en'))
> +        self.useFixture(
> +            fixture_setup.InitctlEnvironmentVariable(LANGUAGE='en'))
> +

39	 self.useFixture(
40	     fixtures.EnvironmentVariable('LANGUAGE', newvalue='en')
         )
41	 self.useFixture(
42	     fixture_setup.InitctlEnvironmentVariable(LANGUAGE='en')
         )

>      def launch_test_local(self):
>          self.app = self.launch_test_application(
>              self.local_location,
> @@ -67,14 +81,9 @@
>              emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
>  
>      def launch_test_installed(self):
> -        if model() == 'Desktop':
> -            self.app = self.launch_test_application(
> -                "dialer-app",
> -                emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
> -        else:
> -            self.app = self.launch_upstart_application(
> -                "dialer-app",
> -                emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
> +        self.app = self.launch_upstart_application(
> +            'dialer-app',
> +            emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)

59 + self.app = self.launch_upstart_application(
60	+ 'dialer-app',
61	+ emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase,
     )

>  
>      def _get_app_proxy_object(self, app_name):
>          return get_proxy_object_for_existing_process(
> 


-- 
https://code.launchpad.net/~canonical-platform-qa/dialer-app/fix1349582-number_format/+merge/228580
Your team Ubuntu Phablet Team is requested to review the proposed merge of lp:~canonical-platform-qa/dialer-app/fix1349582-number_format into lp:dialer-app.



More information about the Ubuntu-reviews mailing list