Merge lp:~ahayzen/ubuntu-weather-app/reboot-fix-ap-location-detect into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 79
Merged at revision: 70
Proposed branch: lp:~ahayzen/ubuntu-weather-app/reboot-fix-ap-location-detect
Merge into: lp:ubuntu-weather-app
Diff against target: 413 lines (+155/-28)
10 files modified
app/components/CurrentLocation.qml (+18/-5)
app/ubuntu-weather-app.qml (+25/-4)
app/ui/LocationsPage.qml (+3/-2)
app/ui/SettingsPage.qml (+5/-0)
app/ui/settings/LocationPage.qml (+36/-0)
debian/changelog (+2/-0)
po/com.ubuntu.weather.pot (+19/-11)
tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt (+1/-1)
tests/autopilot/ubuntu_weather_app/databases/location_added.conf (+3/-0)
tests/autopilot/ubuntu_weather_app/tests/__init__.py (+43/-5)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/reboot-fix-ap-location-detect
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+265908@code.launchpad.net

Commit message

* Add auto detect location option in the settings
* Set auto detect location to false when running autopilot

Description of the change

* Add auto detect location option in the settings
* Set auto detect location to false when running autopilot

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
71. By Andrew Hayzen

* Fixes for PEP8

72. By Andrew Hayzen

* Add changelog

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

There's a few things we'll need to fix.

1. Currently you only hide the current location from the LocationsPage. However, the location is still in the horizontal listview.
2. Perhaps because of #1, when you click on a city from the LocationsPage you get the wrong one.
3. If PositionSource is inactive, do we still need to also check the settings.autoDetectLocation to prevent adding a new location? Won't we not get an update when it's inactive?
4. Let's change "Auto detect location" to "Detect current location"
5. I'm on the fence about this one, but would "Privacy" be better labeled as "Location"? I understand why we'd call it "Privacy", but perhaps "Location" would make it seem less likely to be malicious.
6. Do we need to explicitly refresh when we change the autoDetectLocation setting? Won't getting a new location from PositionSource do this for us?

review: Needs Fixing
73. By Andrew Hayzen

* Change to detectCurrentLocation and use lazy refresh

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

1) This is working for me please retest
2) As in response to #1
3) Not sure which case you are referring to?
4) Changed to "Detect current location"
5) Changed to "Location"
6) I've changed it to lazy refresh, but we need to call the refresh to ensure in the true->false case it is removed from the location list

74. By Andrew Hayzen

* Fix for wrong currentIndex when auto detect location is false and selecting from the LocationsPage

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

Currently the swipe to remove and the reordering (and delete) of the locations in the LocationsPage seems to have broken with this MP.

review: Needs Fixing
75. By Andrew Hayzen

* Fixes for move and remove when without location

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

I believe this has been fixed, please test both cases of with/without the auto location :-)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

When there are no locations and we have location detection off, using the bottom edge is a bit weird. This probably wasn't introduced by your MP, but in the future we should consider disabling the bottom edge hint when we show the button to manually add.

Things to fix:
1. IMO we should make the new setting checkbox toggle when the list item is pressed, rather than requiring the user tap the checkbox. If you have a different opinion let me know.
2. When I try to delete a location using the multiselect I get the following error and the location(s) are not removed:

file:///opt/click.ubuntu.com/com.ubuntu.weather/3.0.75/share/qml/ubuntu-weather-app.qml:288: TypeError: Cannot read
property 'db' of undefined^

review: Needs Fixing
Revision history for this message
Victor Thompson (vthompson) wrote :

For that last item, I think it only happens if you remove the last location--so it's probably the same offset issue as the others.

76. By Andrew Hayzen

* Selecting the listitem now flips the control

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
77. By Andrew Hayzen

* Fix for setting not being saved when selecting the listitem portion

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
78. By Andrew Hayzen

* Fix for multiselect breaking

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Multiselect delete has been fixed and the checkbox is not flipped when you click *anywhere* in the listitem, please retest :-)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
79. By Andrew Hayzen

* Change to actually removing the old detected location from the db

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

lgtm! AP passes locally and on the device.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/components/CurrentLocation.qml'
--- app/components/CurrentLocation.qml 2015-06-18 01:42:03 +0000
+++ app/components/CurrentLocation.qml 2015-07-27 00:58:09 +0000
@@ -41,7 +41,7 @@
41 }41 }
4242
43 function searchResponseHandler(msgObject) {43 function searchResponseHandler(msgObject) {
44 if (!msgObject.error) {44 if (!msgObject.error && settings.detectCurrentLocation) {
45 console.log("Loc to add:", JSON.stringify(msgObject.result.locations[0]))45 console.log("Loc to add:", JSON.stringify(msgObject.result.locations[0]))
46 storage.updateCurrentLocation(msgObject.result.locations[0])46 storage.updateCurrentLocation(msgObject.result.locations[0])
47 }47 }
@@ -51,7 +51,7 @@
51 PositionSource {51 PositionSource {
52 id: currentPosition52 id: currentPosition
53 updateInterval: 100053 updateInterval: 1000
54 active: true54 active: settings.detectCurrentLocation
5555
56 onPositionChanged: {56 onPositionChanged: {
57 var coord = currentPosition.position.coordinate57 var coord = currentPosition.position.coordinate
@@ -75,9 +75,22 @@
75 onCountChanged: {75 onCountChanged: {
76 // Update the currentLocation if one is found and it does not match the stored location76 // Update the currentLocation if one is found and it does not match the stored location
77 if (count > 0 && currentLocation.string !== geocodeModel.get(0).address.city) {77 if (count > 0 && currentLocation.string !== geocodeModel.get(0).address.city) {
78 var loc = geocodeModel.get(0)78 search();
79 currentLocation.string = loc.address.city79 }
80 searchForLocation(loc.coordinate.latitude, loc.coordinate.longitude)80 }
81
82 function search() {
83 var loc = geocodeModel.get(0)
84 currentLocation.string = loc.address.city
85 searchForLocation(loc.coordinate.latitude, loc.coordinate.longitude)
86 }
87 }
88
89 Connections {
90 target: settings
91 onDetectCurrentLocationChanged: {
92 if (settings.detectCurrentLocation) {
93 geocodeModel.search();
81 }94 }
82 }95 }
83 }96 }
8497
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml 2015-07-25 22:06:50 +0000
+++ app/ubuntu-weather-app.qml 2015-07-27 00:58:09 +0000
@@ -132,6 +132,7 @@
132 */132 */
133 property int current: 0133 property int current: 0
134134
135 property bool detectCurrentLocation: true
135 property int refreshInterval: 1800136 property int refreshInterval: 1800
136 property string precipUnits137 property string precipUnits
137 property string service138 property string service
@@ -142,6 +143,17 @@
142 property bool addedCurrentLocation: false143 property bool addedCurrentLocation: false
143 property bool migrated: false144 property bool migrated: false
144145
146 onDetectCurrentLocationChanged: {
147 if (!detectCurrentLocation) {
148 if (addedCurrentLocation) {
149 storage.removeLocation(-1); // indexes are increased by 1
150 addedCurrentLocation = false;
151 }
152
153 refreshData();
154 }
155 }
156
145 Component.onCompleted: {157 Component.onCompleted: {
146 if (units === "") { // No settings so load defaults158 if (units === "") { // No settings so load defaults
147 console.debug("No settings, using defaults")159 console.debug("No settings, using defaults")
@@ -233,8 +245,10 @@
233245
234 function moveLocation(from, to) {246 function moveLocation(from, to) {
235 // Indexes are offset by 1 to account for current location247 // Indexes are offset by 1 to account for current location
236 from += 1248 if (settings.addedCurrentLocation) {
237 to += 1249 from += 1
250 to += 1
251 }
238252
239 // Update settings to respect new changes253 // Update settings to respect new changes
240 if (from === settings.current) {254 if (from === settings.current) {
@@ -253,7 +267,10 @@
253 // Remove a location from the list267 // Remove a location from the list
254 function removeLocation(index) {268 function removeLocation(index) {
255 // Indexes are offset by 1 to account for current location269 // Indexes are offset by 1 to account for current location
256 index += 1270 if (settings.addedCurrentLocation) {
271 index += 1
272 }
273
257 if (settings.current >= index) { // Update settings to respect new changes274 if (settings.current >= index) { // Update settings to respect new changes
258 settings.current -= settings.current;275 settings.current -= settings.current;
259 }276 }
@@ -279,7 +296,11 @@
279 var locations = []296 var locations = []
280297
281 for (i=0; i < indexes.length; i++) {298 for (i=0; i < indexes.length; i++) {
282 locations.push(locationsList[indexes[i] + 1].db.id)299 if (settings.addedCurrentLocation) {
300 locations.push(locationsList[indexes[i] + 1].db.id)
301 } else {
302 locations.push(locationsList[indexes[i]].db.id)
303 }
283 }304 }
284305
285 storage.clearMultiLocation(locations);306 storage.clearMultiLocation(locations);
286307
=== modified file 'app/ui/LocationsPage.qml'
--- app/ui/LocationsPage.qml 2015-06-28 19:04:43 +0000
+++ app/ui/LocationsPage.qml 2015-07-27 00:58:09 +0000
@@ -50,7 +50,7 @@
50 removable: true50 removable: true
51 thisPage: locationsPage51 thisPage: locationsPage
5252
53 onRemoved: storage.removeMultiLocations(selectedItems.slice())53 onRemoved: storage.removeMultiLocations(selectedItems.slice());
54 }54 }
55 ]55 ]
5656
@@ -72,7 +72,7 @@
72 left: parent.left72 left: parent.left
73 right: parent.right73 right: parent.right
74 }74 }
75 height: settings.addedCurrentLocation ? units.gu(8) : units.gu(0)75 height: settings.addedCurrentLocation && settings.detectCurrentLocation ? units.gu(8) : units.gu(0)
76 interactive: false76 interactive: false
77 model: currentLocationModel77 model: currentLocationModel
78 delegate: WeatherListItem {78 delegate: WeatherListItem {
@@ -160,6 +160,7 @@
160160
161 onItemClicked: {161 onItemClicked: {
162 settings.current = index + 1;162 settings.current = index + 1;
163
163 pageStack.pop()164 pageStack.pop()
164 }165 }
165 onReorder: {166 onReorder: {
166167
=== modified file 'app/ui/SettingsPage.qml'
--- app/ui/SettingsPage.qml 2015-06-28 22:54:14 +0000
+++ app/ui/SettingsPage.qml 2015-07-27 00:58:09 +0000
@@ -42,5 +42,10 @@
42 title: i18n.tr("Refresh Interval")42 title: i18n.tr("Refresh Interval")
43 onClicked: mainPageStack.push(Qt.resolvedUrl("settings/RefreshIntervalPage.qml"))43 onClicked: mainPageStack.push(Qt.resolvedUrl("settings/RefreshIntervalPage.qml"))
44 }44 }
45
46 StandardListItem {
47 title: i18n.tr("Location")
48 onClicked: mainPageStack.push(Qt.resolvedUrl("settings/LocationPage.qml"))
49 }
45 }50 }
46}51}
4752
=== added file 'app/ui/settings/LocationPage.qml'
--- app/ui/settings/LocationPage.qml 1970-01-01 00:00:00 +0000
+++ app/ui/settings/LocationPage.qml 2015-07-27 00:58:09 +0000
@@ -0,0 +1,36 @@
1/*
2 * Copyright (C) 2015 Canonical Ltd
3 *
4 * This file is part of Ubuntu Weather App
5 *
6 * Ubuntu Weather App is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3 as
8 * published by the Free Software Foundation.
9 *
10 * Ubuntu Weather App is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import Ubuntu.Components 1.2
21import Ubuntu.Components.ListItems 1.0 as ListItem
22
23Page {
24 title: i18n.tr("Location")
25
26 ListItem.Standard {
27 control: CheckBox {
28 checked: settings.detectCurrentLocation
29
30 onCheckedChanged: settings.detectCurrentLocation = checked;
31 }
32 text: i18n.tr("Detect current location")
33
34 onClicked: control.checked = !control.checked
35 }
36}
037
=== modified file 'debian/changelog'
--- debian/changelog 2015-07-25 21:53:40 +0000
+++ debian/changelog 2015-07-27 00:58:09 +0000
@@ -10,6 +10,8 @@
1010
11 [ Andrew Hayzen ]11 [ Andrew Hayzen ]
12 * Add mocked locations for autopilot and add a test using the data12 * Add mocked locations for autopilot and add a test using the data
13 * Add setting to disable auto detecting location
14 * When running under autopilot do not auto detect location
1315
14 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -050016 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -0500
1517
1618
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-07-18 19:08:21 +0000
+++ po/com.ubuntu.weather.pot 2015-07-27 00:58:09 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: ubuntu-weather-app\n"9"Project-Id-Version: ubuntu-weather-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-07-18 18:04+0100\n"11"POT-Creation-Date: 2015-07-27 01:55+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,31 +18,31 @@
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
2020
21#: ../app/components/DayDelegate.qml:19321#: ../app/components/DayDelegate.qml:199
22msgid "Chance of rain"22msgid "Chance of rain"
23msgstr ""23msgstr ""
2424
25#: ../app/components/DayDelegate.qml:20225#: ../app/components/DayDelegate.qml:205
26msgid "Winds"26msgid "Winds"
27msgstr ""27msgstr ""
2828
29#: ../app/components/DayDelegate.qml:20929#: ../app/components/DayDelegate.qml:212
30msgid "UV Index"30msgid "UV Index"
31msgstr ""31msgstr ""
3232
33#: ../app/components/DayDelegate.qml:21433#: ../app/components/DayDelegate.qml:217
34msgid "Pollen"34msgid "Pollen"
35msgstr ""35msgstr ""
3636
37#: ../app/components/DayDelegate.qml:22037#: ../app/components/DayDelegate.qml:223
38msgid "Humidity"38msgid "Humidity"
39msgstr ""39msgstr ""
4040
41#: ../app/components/DayDelegate.qml:22641#: ../app/components/DayDelegate.qml:229
42msgid "Sunrise"42msgid "Sunrise"
43msgstr ""43msgstr ""
4444
45#: ../app/components/DayDelegate.qml:23245#: ../app/components/DayDelegate.qml:235
46msgid "Sunset"46msgid "Sunset"
47msgstr ""47msgstr ""
4848
@@ -66,11 +66,11 @@
66msgid "Cancel selection"66msgid "Cancel selection"
67msgstr ""67msgstr ""
6868
69#: ../app/ubuntu-weather-app.qml:16869#: ../app/ubuntu-weather-app.qml:184
70msgid "Searching for current location..."70msgid "Searching for current location..."
71msgstr ""71msgstr ""
7272
73#: ../app/ubuntu-weather-app.qml:17773#: ../app/ubuntu-weather-app.qml:193
74msgid "Add a manual location"74msgid "Add a manual location"
75msgstr ""75msgstr ""
7676
@@ -122,7 +122,7 @@
122msgid "Units"122msgid "Units"
123msgstr ""123msgstr ""
124124
125#: ../app/ui/SettingsPage.qml:37 ../app/ui/settings/DataProviderPage.qml:24125#: ../app/ui/SettingsPage.qml:37 ../app/ui/settings/DataProviderPage.qml:25
126msgid "Data Provider"126msgid "Data Provider"
127msgstr ""127msgstr ""
128128
@@ -130,10 +130,18 @@
130msgid "Refresh Interval"130msgid "Refresh Interval"
131msgstr ""131msgstr ""
132132
133#: ../app/ui/SettingsPage.qml:47 ../app/ui/settings/LocationPage.qml:24
134msgid "Location"
135msgstr ""
136
133#: ../app/ui/settings/DataProviderPage.qml:37137#: ../app/ui/settings/DataProviderPage.qml:37
134msgid "Provider"138msgid "Provider"
135msgstr ""139msgstr ""
136140
141#: ../app/ui/settings/LocationPage.qml:32
142msgid "Detect current location"
143msgstr ""
144
137#: ../app/ui/settings/RefreshIntervalPage.qml:30145#: ../app/ui/settings/RefreshIntervalPage.qml:30
138#: ../app/ui/settings/RefreshIntervalPage.qml:31146#: ../app/ui/settings/RefreshIntervalPage.qml:31
139#: ../app/ui/settings/RefreshIntervalPage.qml:32147#: ../app/ui/settings/RefreshIntervalPage.qml:32
140148
=== modified file 'tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt'
--- tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt 2015-07-25 13:52:18 +0000
+++ tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt 2015-07-27 00:58:09 +0000
@@ -1,6 +1,6 @@
1# make the database files visible on qtcreator1# make the database files visible on qtcreator
2file(GLOB PYTHON_TEST_DATABASE_FILES2file(GLOB PYTHON_TEST_DATABASE_FILES
3 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}3 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
4 *.ini)4 *.ini *.conf)
55
6add_custom_target(ubuntu-weather-app_PYTHONTestDatabaseFiles ALL SOURCES ${PYTHON_TEST_DATABASE_FILES})6add_custom_target(ubuntu-weather-app_PYTHONTestDatabaseFiles ALL SOURCES ${PYTHON_TEST_DATABASE_FILES})
77
=== added file 'tests/autopilot/ubuntu_weather_app/databases/location_added.conf'
--- tests/autopilot/ubuntu_weather_app/databases/location_added.conf 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/databases/location_added.conf 2015-07-27 00:58:09 +0000
@@ -0,0 +1,3 @@
1[weatherSettings]
2detectCurrentLocation=false
3migrated=true
04
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py'
--- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2015-07-23 00:50:12 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2015-07-27 00:58:09 +0000
@@ -223,7 +223,7 @@
223223
224 return result224 return result
225225
226 def load_vars(self):226 def load_database_vars(self):
227 self.app_dir = os.path.join(227 self.app_dir = os.path.join(
228 os.environ.get('HOME'),228 os.environ.get('HOME'),
229 ".local/share/com.ubuntu.weather")229 ".local/share/com.ubuntu.weather")
@@ -235,30 +235,68 @@
235 os.path.join(os.path.dirname(__file__), '..', 'files'))235 os.path.join(os.path.dirname(__file__), '..', 'files'))
236236
237237
238class UbuntuWeatherAppTestCase(BaseTestCaseWithPatchedHome, DatabaseMixin):238class SettingsMixin(object):
239
240 """
241 Helper functions for dealing with the settings file
242 """
243
244 def create_settings_with_location_added(self):
245 logger.debug("Creating settings with location added")
246
247 if not os.path.exists(self.settings_dir):
248 os.makedirs(self.settings_dir)
249
250 shutil.copyfile(self.settings_location_added, self.settings_filepath)
251
252 self.assertThat(
253 lambda: os.path.exists(self.settings_filepath),
254 Eventually(Equals(True)))
255
256 def load_settings_vars(self):
257 self.db_dir = os.path.abspath(
258 os.path.join(os.path.dirname(__file__), '..', 'databases'))
259 self.settings_dir = os.path.join(
260 os.environ.get('HOME'),
261 ".config/com.ubuntu.weather")
262 self.settings_filepath = os.path.join(self.settings_dir,
263 'com.ubuntu.weather.conf')
264 self.settings_location_added = os.path.join(self.db_dir,
265 "location_added.conf")
266
267
268class UbuntuWeatherAppTestCase(BaseTestCaseWithPatchedHome, DatabaseMixin,
269 SettingsMixin):
239270
240 """Base test case that launches the ubuntu-weather-app."""271 """Base test case that launches the ubuntu-weather-app."""
241272
242 def setUp(self):273 def setUp(self):
243 super(UbuntuWeatherAppTestCase, self).setUp()274 super(UbuntuWeatherAppTestCase, self).setUp()
244275
245 self.load_vars()276 self.load_database_vars()
246 self.create_blank_db()277 self.create_blank_db()
247278
279 self.load_settings_vars()
280 self.create_settings_with_location_added()
281
248 self.app = UbuntuWeatherApp(self.launcher())282 self.app = UbuntuWeatherApp(self.launcher())
249283
250284
251class UbuntuWeatherAppTestCaseWithData(BaseTestCaseWithPatchedHome,285class UbuntuWeatherAppTestCaseWithData(BaseTestCaseWithPatchedHome,
252 DatabaseMixin):286 DatabaseMixin,
287 SettingsMixin):
253288
254 """Base test case that launches the ubuntu-weather-app with data."""289 """Base test case that launches the ubuntu-weather-app with data."""
255290
256 def setUp(self):291 def setUp(self):
257 super(UbuntuWeatherAppTestCaseWithData, self).setUp()292 super(UbuntuWeatherAppTestCaseWithData, self).setUp()
258293
259 self.load_vars()294 self.load_database_vars()
260 self.create_blank_db()295 self.create_blank_db()
261296
297 self.load_settings_vars()
298 self.create_settings_with_location_added()
299
262 logger.debug("Adding fake data to new database")300 logger.debug("Adding fake data to new database")
263 self.add_locations_to_database()301 self.add_locations_to_database()
264302

Subscribers

People subscribed via source and target branches

to all changes: