← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-autopilot-warning into lp:ubuntu-calculator-app

 

Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-autopilot-warning into lp:ubuntu-calculator-app.

Commit message:
Use fixtures.EnvironmentVariable instead of patch_environment, which
    is deprecated.

Requested reviews:
  Ubuntu Calculator Developers (ubuntu-calculator-dev)

For more details, see:
https://code.launchpad.net/~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-autopilot-warning/+merge/257859

Use fixtures.EnvironmentVariable instead of patch_environment, which
    is deprecated.
-- 
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~gang65/ubuntu-calculator-app/ubuntu-calculator-app-fix-autopilot-warning into lp:ubuntu-calculator-app.
=== modified file 'tests/autopilot/ubuntu_calculator_app/tests/__init__.py'
--- tests/autopilot/ubuntu_calculator_app/tests/__init__.py	2015-04-14 19:17:35 +0000
+++ tests/autopilot/ubuntu_calculator_app/tests/__init__.py	2015-04-30 08:36:23 +0000
@@ -1,6 +1,6 @@
 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 #
-# Copyright (C) 2013, 2014 Canonical Ltd
+# Copyright (C) 2013-2015 Canonical Ltd
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 3 as
@@ -19,6 +19,7 @@
 import os
 import shutil
 import logging
+import fixtures
 
 import ubuntu_calculator_app
 
@@ -65,7 +66,7 @@
         # Unset the current locale to ensure locale-specific data
         # (day and month names, first day of the week, …) doesn’t get
         # in the way of test expectations.
-        self.patch_environment('LC_ALL', 'C')
+        self.useFixture(fixtures.EnvironmentVariable('LC_ALL', 'C'))
         self.app = ubuntu_calculator_app.CalculatorApp(self.launcher(),
                                                        self.test_type)
 


Follow ups