Merge lp:~ahayzen/ubuntu-weather-app/reboot-ap-create-fake-env into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 72
Merged at revision: 63
Proposed branch: lp:~ahayzen/ubuntu-weather-app/reboot-ap-create-fake-env
Merge into: lp:ubuntu-weather-app
Diff against target: 3514 lines (+3311/-41)
15 files modified
README.autopilot (+57/-0)
app/ui/HomePage.qml (+1/-0)
debian/changelog (+4/-0)
po/com.ubuntu.weather.pot (+4/-4)
tests/autopilot/ubuntu_weather_app/CMakeLists.txt (+2/-0)
tests/autopilot/ubuntu_weather_app/__init__.py (+24/-1)
tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.ini (+6/-0)
tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt (+6/-0)
tests/autopilot/ubuntu_weather_app/files/1.json (+1509/-0)
tests/autopilot/ubuntu_weather_app/files/2.json (+1509/-0)
tests/autopilot/ubuntu_weather_app/files/CMakeLists.txt (+6/-0)
tests/autopilot/ubuntu_weather_app/tests/__init__.py (+116/-1)
tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py (+35/-0)
tests/autopilot/ubuntu_weather_app/tests/test_home_page.py (+32/-0)
tests/autopilot/ubuntu_weather_app/tests/test_weather.py (+0/-35)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/reboot-ap-create-fake-env
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Andrew Hayzen Abstain
Review via email: mp+265191@code.launchpad.net

Commit message

* Create two tests one with an empty database and one with a populated database
* Add mocked locations for tests

Description of the change

* Create two tests one with an empty database and one with a populated database
* Add mocked locations for tests

NOTES
* Are we able to test if the AP tests are running on jenkins yet or is vivid still broken?

To post a comment you must log in.
65. By Andrew Hayzen

* Add extra code comments

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
66. 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
Andrew Hayzen (ahayzen) wrote :

adt-run [23:00:30]: test autopilot: - - - - - - - - - - results - - - - - - - - - -
autopilot PASS

\o/

I'll merge in the readme and fix it up with what I did :-)

67. By Andrew Hayzen

* Merge of lp:~vthompson/ubuntu-weather-app/reboot-ap-readme

68. By Andrew Hayzen

* Update readme to new instructions

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 :

I have some inline comments. Also, how were the JSON files generated? They appear to be different than what was in the legacy app?

review: Needs Fixing
69. By Andrew Hayzen

* Remove mention of clock and fix bracket formatting

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

There are at least a few more trailing parens on newlines

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

* Further bracket fixes

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 :

I have a few more inline comments. At least one (2 really) of them should be fixed.

review: Needs Fixing
71. By Andrew Hayzen

* Remove mention of emulate and inclusion of binary files

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 :

Ok, things are looking good. Could you update the CMakeLists.txt to remove emulator completely? See inline comments.

review: Needs Fixing
72. By Andrew Hayzen

* Removal of more uses of the phrase emulator

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

Removed some more mentions of 'emulator', please rereview :-)

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

..Maybe the resubmit is not what i think it is, i'll abstain to not confuse jenkins :-)

review: Abstain
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!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'README.autopilot'
--- README.autopilot 1970-01-01 00:00:00 +0000
+++ README.autopilot 2015-07-25 13:52:29 +0000
@@ -0,0 +1,57 @@
1# Running Autopilot tests
2
3The Weather app follows a test driven development where autopilot tests are run before every merge into trunk. If you are submitting your bugfix/patch to the Weather app, please follow the following steps below to ensure that all tests pass before proposing a merge request.
4
5If you are looking for more info about Autopilot or writing AP tests for the weather app, here are some useful links to help you:
6
7- http://developer.ubuntu.com/start/quality
8- https://developer.ubuntu.com/api/autopilot/python/1.5.0/
9
10For help and options on running tests, see:
11
12- https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/
13
14## Prerequisites
15
16Install the following autopilot packages required to run the tests,
17$ sudo apt-get install python3-autopilot libautopilot-qt ubuntu-ui-toolkit-autopilot python3-autopilot-vis
18
19## Running tests on the desktop
20
21Using terminal:
22
23* Branch the Weather app code, for example,
24 $ bzr branch lp:ubuntu-weather-app
25
26* Navigate to the tests/autopilot directory.
27 $ cd ubuntu-weather-app/tests/autopilot
28
29* run all tests.
30 $ autopilot3 run -vv ubuntu_weather_app
31
32 to list all tests:
33 $ autopilot3 list ubuntu_weather_app
34
35 To run only one test (for instance: ubuntu_weather_app.tests.test_empty_state.TestEmptyState.test_add_location_button)
36 $ autopilot3 run -vv ubuntu_weather_app.tests.test_empty_state.TestEmptyState.test_add_location_button
37
38 Debugging tests using autopilot vis
39 $ autopilot3 launch -i Qt qmlscene app/ubuntu-weather-app.qml
40 $ autopilot3 vis
41
42
43## Running tests on device or emulator:
44
45Using autopkg:
46
47* Branch the Weather app code, for example,
48 $ bzr branch lp:ubuntu-weather-app
49
50* Navigate to the source directory.
51 $ cd ubuntu-weather-app
52
53* Build a click package
54 $ click-buddy .
55
56* Run the tests on device (assumes only one click package in the directory)
57 $ adt-run . *.click --- ssh -s adb -- -p <PASSWORD>
058
=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml 2015-06-18 01:42:03 +0000
+++ app/ui/HomePage.qml 2015-07-25 13:52:29 +0000
@@ -122,6 +122,7 @@
122 */122 */
123 ListView {123 ListView {
124 id: locationPages124 id: locationPages
125 objectName: "locationPages"
125 anchors.fill: parent126 anchors.fill: parent
126 currentIndex: settings.current127 currentIndex: settings.current
127 delegate: LocationPane {}128 delegate: LocationPane {}
128129
=== modified file 'debian/changelog'
--- debian/changelog 2015-06-02 01:15:28 +0000
+++ debian/changelog 2015-07-25 13:52:29 +0000
@@ -1,7 +1,11 @@
1ubuntu-weather-app (3.0) UNRELEASED; urgency=medium1ubuntu-weather-app (3.0) UNRELEASED; urgency=medium
22
3 [ Victor Thompson ]
3 * Sync debian version with click version.4 * Sync debian version with click version.
45
6 [ Andrew Hayzen ]
7 * Add mocked locations for autopilot and add a test using the data
8
5 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -05009 -- Victor Thompson <victor.thompson@gmail.com> Mon, 01 Jun 2015 20:11:23 -0500
610
7ubuntu-weather-app (2.1) UNRELEASED; urgency=medium11ubuntu-weather-app (2.1) UNRELEASED; urgency=medium
812
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-06-29 00:20:51 +0000
+++ po/com.ubuntu.weather.pot 2015-07-25 13:52:29 +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-06-28 19:17-0500\n"11"POT-Creation-Date: 2015-07-18 18:04+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"
@@ -118,15 +118,15 @@
118msgid "Settings"118msgid "Settings"
119msgstr ""119msgstr ""
120120
121#: ../app/ui/SettingsPage.qml:38 ../app/ui/settings/UnitsPage.qml:24121#: ../app/ui/SettingsPage.qml:32 ../app/ui/settings/UnitsPage.qml:24
122msgid "Units"122msgid "Units"
123msgstr ""123msgstr ""
124124
125#: ../app/ui/SettingsPage.qml:43 ../app/ui/settings/DataProviderPage.qml:24125#: ../app/ui/SettingsPage.qml:37 ../app/ui/settings/DataProviderPage.qml:24
126msgid "Data Provider"126msgid "Data Provider"
127msgstr ""127msgstr ""
128128
129#: ../app/ui/SettingsPage.qml:48 ../app/ui/settings/RefreshIntervalPage.qml:24129#: ../app/ui/SettingsPage.qml:42 ../app/ui/settings/RefreshIntervalPage.qml:24
130msgid "Refresh Interval"130msgid "Refresh Interval"
131msgstr ""131msgstr ""
132132
133133
=== modified file 'tests/autopilot/ubuntu_weather_app/CMakeLists.txt'
--- tests/autopilot/ubuntu_weather_app/CMakeLists.txt 2015-04-29 17:31:56 +0000
+++ tests/autopilot/ubuntu_weather_app/CMakeLists.txt 2015-07-25 13:52:29 +0000
@@ -1,3 +1,5 @@
1add_subdirectory(databases)
2add_subdirectory(files)
1add_subdirectory(tests)3add_subdirectory(tests)
24
3# make the emulator files visible on qtcreator5# make the emulator files visible on qtcreator
46
=== modified file 'tests/autopilot/ubuntu_weather_app/__init__.py'
--- tests/autopilot/ubuntu_weather_app/__init__.py 2015-06-14 23:57:35 +0000
+++ tests/autopilot/ubuntu_weather_app/__init__.py 2015-07-25 13:52:29 +0000
@@ -26,12 +26,19 @@
2626
27 def __init__(self, app_proxy):27 def __init__(self, app_proxy):
28 self.app = app_proxy28 self.app = app_proxy
29 self.main_view = self.app.wait_select_single(MainView)29
30 # FIXME: Select by objectName due to it being MainView12 not MainView
31 # pad.lv/1350532
32 self.main_view = self.app.wait_select_single(objectName="weather")
3033
31 def get_add_location_page(self):34 def get_add_location_page(self):
32 return self.main_view.wait_select_single(35 return self.main_view.wait_select_single(
33 AddLocationPage, objectName="addLocationPage")36 AddLocationPage, objectName="addLocationPage")
3437
38 def get_home_page(self):
39 return self.main_view.wait_select_single(
40 HomePage, objectName="homePage")
41
35 def click_add_location_button(self):42 def click_add_location_button(self):
36 add_location_button = self.main_view.wait_select_single(43 add_location_button = self.main_view.wait_select_single(
37 "Button", objectName="emptyStateButton")44 "Button", objectName="emptyStateButton")
@@ -44,12 +51,28 @@
44 super(Page, self).__init__(*args)51 super(Page, self).__init__(*args)
4552
4653
54class PageWithBottomEdge(Page):
55 """Autopilot helper for PageWithBottomEdge."""
56 def __init__(self, *args):
57 super(PageWithBottomEdge, self).__init__(*args)
58
59
47class AddLocationPage(Page):60class AddLocationPage(Page):
48 """Autopilot helper for AddLocationPage."""61 """Autopilot helper for AddLocationPage."""
49 def __init__(self, *args):62 def __init__(self, *args):
50 super(AddLocationPage, self).__init__(*args)63 super(AddLocationPage, self).__init__(*args)
5164
5265
66class HomePage(Page):
67 """Autopilot helper for HomePage."""
68 def __init__(self, *args):
69 super(HomePage, self).__init__(*args)
70
71 def get_location_count(self):
72 return self.wait_select_single(
73 "QQuickListView", objectName="locationPages").count
74
75
53class MainView(MainView):76class MainView(MainView):
54 """Autopilot custom proxy object for the MainView."""77 """Autopilot custom proxy object for the MainView."""
55 retry_delay = 0.278 retry_delay = 0.2
5679
=== added directory 'tests/autopilot/ubuntu_weather_app/databases'
=== added file 'tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.ini'
--- tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.ini 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.ini 2015-07-25 13:52:29 +0000
@@ -0,0 +1,6 @@
1[General]
2Description=Default Ubuntu weather app
3Driver=QSQLITE
4EstimatedSize=100000
5Name=com.ubuntu.weather
6Version=0.3
07
=== added file 'tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.sqlite'
1Binary files tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.sqlite 1970-01-01 00:00:00 +0000 and tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.sqlite 2015-07-25 13:52:29 +0000 differ8Binary files tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.sqlite 1970-01-01 00:00:00 +0000 and tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.sqlite 2015-07-25 13:52:29 +0000 differ
=== added file 'tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt'
--- tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/databases/CMakeLists.txt 2015-07-25 13:52:29 +0000
@@ -0,0 +1,6 @@
1# make the database files visible on qtcreator
2file(GLOB PYTHON_TEST_DATABASE_FILES
3 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
4 *.ini)
5
6add_custom_target(ubuntu-weather-app_PYTHONTestDatabaseFiles ALL SOURCES ${PYTHON_TEST_DATABASE_FILES})
07
=== added directory 'tests/autopilot/ubuntu_weather_app/files'
=== added file 'tests/autopilot/ubuntu_weather_app/files/1.json'
--- tests/autopilot/ubuntu_weather_app/files/1.json 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/files/1.json 2015-07-25 13:52:29 +0000
@@ -0,0 +1,1509 @@
1{
2 "db":{
3 "id":4,
4 "updated":"2015-07-18T17:07:53.668Z"
5 },
6 "format":20150404,
7 "location":{
8 "objectName":"",
9 "adminName1":"England",
10 "adminName2":"Greater London",
11 "adminName3":"",
12 "areaLabel":"England, Greater London, United Kingdom",
13 "coord":{
14 "lat":"51.50853",
15 "lon":"-0.12574"
16 },
17 "country":"GB",
18 "countryName":"United Kingdom",
19 "name":"London",
20 "population":7556900,
21 "services":{
22 "geonames":2643743,
23 "openweathermap":2643743
24 },
25 "timezone":{
26 "dstOffset":1,
27 "gmtOffset":0,
28 "timeZoneId":"Europe/London"
29 }
30 },
31 "data":[
32 {
33 "condition":"Clouds",
34 "date":{
35 "date":18,
36 "hours":11,
37 "minutes":59,
38 "month":6,
39 "year":2015
40 },
41 "hourly":[
42 {
43 "condition":"Clouds",
44 "date":{
45 "date":18,
46 "hours":18,
47 "minutes":0,
48 "month":6,
49 "year":2015
50 },
51 "humidity":45,
52 "icon":"cloud",
53 "imperial":{
54 "rain":0,
55 "snow":0,
56 "temp":71.006,
57 "windSpeed":6.0704
58 },
59 "metric":{
60 "rain":0,
61 "snow":0,
62 "temp":21.67,
63 "windSpeed":9.756
64 },
65 "pressure":1020.88,
66 "timestamp":1437242400,
67 "windDeg":233.508,
68 "windDir":"SW"
69 },
70 {
71 "condition":"Clouds",
72 "date":{
73 "date":18,
74 "hours":21,
75 "minutes":0,
76 "month":6,
77 "year":2015
78 },
79 "humidity":49,
80 "icon":"cloud",
81 "imperial":{
82 "rain":0,
83 "snow":0,
84 "temp":65.84,
85 "windSpeed":5.0624
86 },
87 "metric":{
88 "rain":0,
89 "snow":0,
90 "temp":18.8,
91 "windSpeed":8.136
92 },
93 "pressure":1020.14,
94 "timestamp":1437253200,
95 "windDeg":211.004,
96 "windDir":"SW"
97 }
98 ],
99 "humidity":63,
100 "icon":"cloud_sun",
101 "imperial":{
102 "rain":0,
103 "snow":0,
104 "tempMax":73.724,
105 "tempMin":61.7,
106 "windSpeed":12.4544
107 },
108 "metric":{
109 "rain":0,
110 "snow":0,
111 "tempMax":23.18,
112 "tempMin":16.5,
113 "windSpeed":20.016
114 },
115 "pressure":1022.45,
116 "timestamp":1437220800,
117 "windDeg":247,
118 "windDir":"W",
119 "current":{
120 "condition":"Clouds",
121 "date":{
122 "date":18,
123 "hours":11,
124 "minutes":59,
125 "month":6,
126 "year":2015
127 },
128 "humidity":31,
129 "icon":"cloud",
130 "imperial":{
131 "rain":0,
132 "snow":0,
133 "temp":73.112,
134 "windSpeed":8.064000000000002
135 },
136 "metric":{
137 "rain":0,
138 "snow":0,
139 "temp":22.84,
140 "windSpeed":12.96
141 },
142 "pressure":1015,
143 "timestamp":1437237984,
144 "windDeg":230,
145 "windDir":"SW",
146 "service":"openweathermap",
147 "service_id":2643743
148 }
149 },
150 {
151 "condition":"Rain",
152 "date":{
153 "date":19,
154 "hours":11,
155 "minutes":59,
156 "month":6,
157 "year":2015
158 },
159 "hourly":[
160 {
161 "condition":"Clouds",
162 "date":{
163 "date":19,
164 "hours":0,
165 "minutes":0,
166 "month":6,
167 "year":2015
168 },
169 "humidity":53,
170 "icon":"cloud",
171 "imperial":{
172 "rain":0,
173 "snow":0,
174 "temp":62.654,
175 "windSpeed":4.412800000000001
176 },
177 "metric":{
178 "rain":0,
179 "snow":0,
180 "temp":17.03,
181 "windSpeed":7.092
182 },
183 "pressure":1019.63,
184 "timestamp":1437264000,
185 "windDeg":228.006,
186 "windDir":"SW"
187 },
188 {
189 "condition":"Clouds",
190 "date":{
191 "date":19,
192 "hours":3,
193 "minutes":0,
194 "month":6,
195 "year":2015
196 },
197 "humidity":53,
198 "icon":"cloud",
199 "imperial":{
200 "rain":0,
201 "snow":0,
202 "temp":60.385999999999996,
203 "windSpeed":3.1584000000000003
204 },
205 "metric":{
206 "rain":0,
207 "snow":0,
208 "temp":15.77,
209 "windSpeed":5.076
210 },
211 "pressure":1016.87,
212 "timestamp":1437274800,
213 "windDeg":167.002,
214 "windDir":"S"
215 },
216 {
217 "condition":"Rain",
218 "date":{
219 "date":19,
220 "hours":6,
221 "minutes":0,
222 "month":6,
223 "year":2015
224 },
225 "humidity":92,
226 "icon":"rain",
227 "imperial":{
228 "rain":0.0860236220472441,
229 "snow":0,
230 "temp":53.294,
231 "windSpeed":4.7264
232 },
233 "metric":{
234 "rain":2.185,
235 "snow":0,
236 "temp":11.83,
237 "windSpeed":7.596
238 },
239 "pressure":1016.41,
240 "timestamp":1437285600,
241 "windDeg":247.002,
242 "windDir":"W"
243 },
244 {
245 "condition":"Rain",
246 "date":{
247 "date":19,
248 "hours":9,
249 "minutes":0,
250 "month":6,
251 "year":2015
252 },
253 "humidity":78,
254 "icon":"rain",
255 "imperial":{
256 "rain":0.055314960629921264,
257 "snow":0,
258 "temp":59.414,
259 "windSpeed":5.734400000000001
260 },
261 "metric":{
262 "rain":1.405,
263 "snow":0,
264 "temp":15.23,
265 "windSpeed":9.216000000000001
266 },
267 "pressure":1014.95,
268 "timestamp":1437296400,
269 "windDeg":226.5,
270 "windDir":"SW"
271 },
272 {
273 "condition":"Clouds",
274 "date":{
275 "date":19,
276 "hours":12,
277 "minutes":0,
278 "month":6,
279 "year":2015
280 },
281 "humidity":66,
282 "icon":"cloud_sun",
283 "imperial":{
284 "rain":0,
285 "snow":0,
286 "temp":67.154,
287 "windSpeed":10.259200000000002
288 },
289 "metric":{
290 "rain":0,
291 "snow":0,
292 "temp":19.53,
293 "windSpeed":16.488
294 },
295 "pressure":1014.32,
296 "timestamp":1437307200,
297 "windDeg":247.005,
298 "windDir":"W"
299 },
300 {
301 "condition":"Rain",
302 "date":{
303 "date":19,
304 "hours":15,
305 "minutes":0,
306 "month":6,
307 "year":2015
308 },
309 "humidity":59,
310 "icon":"rain",
311 "imperial":{
312 "rain":0.00019685039370078743,
313 "snow":0,
314 "temp":68.45,
315 "windSpeed":10.886400000000002
316 },
317 "metric":{
318 "rain":0.005,
319 "snow":0,
320 "temp":20.25,
321 "windSpeed":17.496000000000002
322 },
323 "pressure":1015.06,
324 "timestamp":1437318000,
325 "windDeg":263.001,
326 "windDir":"W"
327 },
328 {
329 "condition":"Clouds",
330 "date":{
331 "date":19,
332 "hours":18,
333 "minutes":0,
334 "month":6,
335 "year":2015
336 },
337 "humidity":51,
338 "icon":"cloud_sun",
339 "imperial":{
340 "rain":0,
341 "snow":0,
342 "temp":67.676,
343 "windSpeed":7.772800000000001
344 },
345 "metric":{
346 "rain":0,
347 "snow":0,
348 "temp":19.82,
349 "windSpeed":12.492
350 },
351 "pressure":1015.53,
352 "timestamp":1437328800,
353 "windDeg":269.502,
354 "windDir":"W"
355 },
356 {
357 "condition":"Clear",
358 "date":{
359 "date":19,
360 "hours":21,
361 "minutes":0,
362 "month":6,
363 "year":2015
364 },
365 "humidity":59,
366 "icon":"moon",
367 "imperial":{
368 "rain":0,
369 "snow":0,
370 "temp":60.494,
371 "windSpeed":4.9952000000000005
372 },
373 "metric":{
374 "rain":0,
375 "snow":0,
376 "temp":15.83,
377 "windSpeed":8.028
378 },
379 "pressure":1017.12,
380 "timestamp":1437339600,
381 "windDeg":255.003,
382 "windDir":"W"
383 }
384 ],
385 "humidity":81,
386 "icon":"rain",
387 "imperial":{
388 "rain":0.19173228346456694,
389 "snow":0,
390 "tempMax":67.37,
391 "tempMin":48.74,
392 "windSpeed":19.4432
393 },
394 "metric":{
395 "rain":4.87,
396 "snow":0,
397 "tempMax":19.65,
398 "tempMin":9.3,
399 "windSpeed":31.248
400 },
401 "pressure":1014.57,
402 "timestamp":1437307200,
403 "windDeg":251,
404 "windDir":"W"
405 },
406 {
407 "condition":"Rain",
408 "date":{
409 "date":20,
410 "hours":11,
411 "minutes":59,
412 "month":6,
413 "year":2015
414 },
415 "hourly":[
416 {
417 "condition":"Clear",
418 "date":{
419 "date":20,
420 "hours":0,
421 "minutes":0,
422 "month":6,
423 "year":2015
424 },
425 "humidity":78,
426 "icon":"moon",
427 "imperial":{
428 "rain":0,
429 "snow":0,
430 "temp":52.43,
431 "windSpeed":2.576
432 },
433 "metric":{
434 "rain":0,
435 "snow":0,
436 "temp":11.35,
437 "windSpeed":4.14
438 },
439 "pressure":1017.21,
440 "timestamp":1437350400,
441 "windDeg":230.008,
442 "windDir":"SW"
443 },
444 {
445 "condition":"Clouds",
446 "date":{
447 "date":20,
448 "hours":3,
449 "minutes":0,
450 "month":6,
451 "year":2015
452 },
453 "humidity":88,
454 "icon":"cloud_moon",
455 "imperial":{
456 "rain":0,
457 "snow":0,
458 "temp":47.480000000000004,
459 "windSpeed":2.3744000000000005
460 },
461 "metric":{
462 "rain":0,
463 "snow":0,
464 "temp":8.6,
465 "windSpeed":3.8160000000000003
466 },
467 "pressure":1016.59,
468 "timestamp":1437361200,
469 "windDeg":166.004,
470 "windDir":"S"
471 },
472 {
473 "condition":"Rain",
474 "date":{
475 "date":20,
476 "hours":6,
477 "minutes":0,
478 "month":6,
479 "year":2015
480 },
481 "humidity":82,
482 "icon":"rain",
483 "imperial":{
484 "rain":0.001377952755905512,
485 "snow":0,
486 "temp":53.69,
487 "windSpeed":2.6208
488 },
489 "metric":{
490 "rain":0.035,
491 "snow":0,
492 "temp":12.05,
493 "windSpeed":4.212
494 },
495 "pressure":1016.62,
496 "timestamp":1437372000,
497 "windDeg":141.001,
498 "windDir":"SE"
499 },
500 {
501 "condition":"Rain",
502 "date":{
503 "date":20,
504 "hours":9,
505 "minutes":0,
506 "month":6,
507 "year":2015
508 },
509 "humidity":83,
510 "icon":"rain",
511 "imperial":{
512 "rain":0.010629921259842521,
513 "snow":0,
514 "temp":59.36,
515 "windSpeed":3.4048000000000003
516 },
517 "metric":{
518 "rain":0.27,
519 "snow":0,
520 "temp":15.2,
521 "windSpeed":5.472
522 },
523 "pressure":1016.18,
524 "timestamp":1437382800,
525 "windDeg":135,
526 "windDir":"SE"
527 },
528 {
529 "condition":"Rain",
530 "date":{
531 "date":20,
532 "hours":12,
533 "minutes":0,
534 "month":6,
535 "year":2015
536 },
537 "humidity":72,
538 "icon":"rain",
539 "imperial":{
540 "rain":0.004330708661417323,
541 "snow":0,
542 "temp":66.956,
543 "windSpeed":5.3984000000000005
544 },
545 "metric":{
546 "rain":0.11,
547 "snow":0,
548 "temp":19.42,
549 "windSpeed":8.676
550 },
551 "pressure":1015.33,
552 "timestamp":1437393600,
553 "windDeg":167.001,
554 "windDir":"S"
555 },
556 {
557 "condition":"Rain",
558 "date":{
559 "date":20,
560 "hours":15,
561 "minutes":0,
562 "month":6,
563 "year":2015
564 },
565 "humidity":68,
566 "icon":"rain",
567 "imperial":{
568 "rain":0.003149606299212599,
569 "snow":0,
570 "temp":72.968,
571 "windSpeed":9.7664
572 },
573 "metric":{
574 "rain":0.08,
575 "snow":0,
576 "temp":22.76,
577 "windSpeed":15.696000000000002
578 },
579 "pressure":1014.09,
580 "timestamp":1437404400,
581 "windDeg":220.002,
582 "windDir":"SW"
583 },
584 {
585 "condition":"Rain",
586 "date":{
587 "date":20,
588 "hours":18,
589 "minutes":0,
590 "month":6,
591 "year":2015
592 },
593 "humidity":83,
594 "icon":"rain",
595 "imperial":{
596 "rain":0.03582677165354331,
597 "snow":0,
598 "temp":68.036,
599 "windSpeed":12.118400000000001
600 },
601 "metric":{
602 "rain":0.91,
603 "snow":0,
604 "temp":20.02,
605 "windSpeed":19.476000000000003
606 },
607 "pressure":1013.88,
608 "timestamp":1437415200,
609 "windDeg":223.502,
610 "windDir":"SW"
611 },
612 {
613 "condition":"Rain",
614 "date":{
615 "date":20,
616 "hours":21,
617 "minutes":0,
618 "month":6,
619 "year":2015
620 },
621 "humidity":83,
622 "icon":"rain",
623 "imperial":{
624 "rain":0.005118110236220473,
625 "snow":0,
626 "temp":66.38,
627 "windSpeed":10.9536
628 },
629 "metric":{
630 "rain":0.13,
631 "snow":0,
632 "temp":19.1,
633 "windSpeed":17.604
634 },
635 "pressure":1013.72,
636 "timestamp":1437426000,
637 "windDeg":224.006,
638 "windDir":"SW"
639 }
640 ],
641 "humidity":81,
642 "icon":"rain",
643 "imperial":{
644 "rain":0.030708661417322838,
645 "snow":0,
646 "tempMax":71.798,
647 "tempMin":52.519999999999996,
648 "windSpeed":10.2144
649 },
650 "metric":{
651 "rain":0.78,
652 "snow":0,
653 "tempMax":22.11,
654 "tempMin":11.4,
655 "windSpeed":16.416
656 },
657 "pressure":1016.62,
658 "timestamp":1437393600,
659 "windDeg":168,
660 "windDir":"S"
661 },
662 {
663 "condition":"Clouds",
664 "date":{
665 "date":21,
666 "hours":11,
667 "minutes":59,
668 "month":6,
669 "year":2015
670 },
671 "hourly":[
672 {
673 "condition":"Rain",
674 "date":{
675 "date":21,
676 "hours":0,
677 "minutes":0,
678 "month":6,
679 "year":2015
680 },
681 "humidity":87,
682 "icon":"rain",
683 "imperial":{
684 "rain":0.01653543307086614,
685 "snow":0,
686 "temp":64.274,
687 "windSpeed":9.8336
688 },
689 "metric":{
690 "rain":0.42,
691 "snow":0,
692 "temp":17.93,
693 "windSpeed":15.803999999999998
694 },
695 "pressure":1014.36,
696 "timestamp":1437436800,
697 "windDeg":237.503,
698 "windDir":"SW"
699 },
700 {
701 "condition":"Clear",
702 "date":{
703 "date":21,
704 "hours":3,
705 "minutes":0,
706 "month":6,
707 "year":2015
708 },
709 "humidity":82,
710 "icon":"cloud_moon",
711 "imperial":{
712 "rain":0,
713 "snow":0,
714 "temp":59.684,
715 "windSpeed":7.840000000000001
716 },
717 "metric":{
718 "rain":0,
719 "snow":0,
720 "temp":15.38,
721 "windSpeed":12.6
722 },
723 "pressure":1015,
724 "timestamp":1437447600,
725 "windDeg":249.502,
726 "windDir":"W"
727 },
728 {
729 "condition":"Clear",
730 "date":{
731 "date":21,
732 "hours":6,
733 "minutes":0,
734 "month":6,
735 "year":2015
736 },
737 "humidity":81,
738 "icon":"sun",
739 "imperial":{
740 "rain":0,
741 "snow":0,
742 "temp":58.838,
743 "windSpeed":7.459200000000001
744 },
745 "metric":{
746 "rain":0,
747 "snow":0,
748 "temp":14.91,
749 "windSpeed":11.988000000000001
750 },
751 "pressure":1015.87,
752 "timestamp":1437458400,
753 "windDeg":245.502,
754 "windDir":"W"
755 },
756 {
757 "condition":"Clear",
758 "date":{
759 "date":21,
760 "hours":9,
761 "minutes":0,
762 "month":6,
763 "year":2015
764 },
765 "humidity":72,
766 "icon":"sun",
767 "imperial":{
768 "rain":0,
769 "snow":0,
770 "temp":64.544,
771 "windSpeed":8.624
772 },
773 "metric":{
774 "rain":0,
775 "snow":0,
776 "temp":18.08,
777 "windSpeed":13.860000000000001
778 },
779 "pressure":1016.56,
780 "timestamp":1437469200,
781 "windDeg":234.001,
782 "windDir":"SW"
783 },
784 {
785 "condition":"Clear",
786 "date":{
787 "date":21,
788 "hours":12,
789 "minutes":0,
790 "month":6,
791 "year":2015
792 },
793 "humidity":65,
794 "icon":"sun",
795 "imperial":{
796 "rain":0,
797 "snow":0,
798 "temp":69.74600000000001,
799 "windSpeed":10.4608
800 },
801 "metric":{
802 "rain":0,
803 "snow":0,
804 "temp":20.97,
805 "windSpeed":16.812
806 },
807 "pressure":1016.62,
808 "timestamp":1437480000,
809 "windDeg":228.508,
810 "windDir":"SW"
811 },
812 {
813 "condition":"Clear",
814 "date":{
815 "date":21,
816 "hours":15,
817 "minutes":0,
818 "month":6,
819 "year":2015
820 },
821 "humidity":59,
822 "icon":"sun",
823 "imperial":{
824 "rain":0,
825 "snow":0,
826 "temp":71.564,
827 "windSpeed":11.6704
828 },
829 "metric":{
830 "rain":0,
831 "snow":0,
832 "temp":21.98,
833 "windSpeed":18.756
834 },
835 "pressure":1016.46,
836 "timestamp":1437490800,
837 "windDeg":235,
838 "windDir":"SW"
839 },
840 {
841 "condition":"Clouds",
842 "date":{
843 "date":21,
844 "hours":18,
845 "minutes":0,
846 "month":6,
847 "year":2015
848 },
849 "humidity":58,
850 "icon":"cloud_sun",
851 "imperial":{
852 "rain":0,
853 "snow":0,
854 "temp":69.29599999999999,
855 "windSpeed":10.796800000000001
856 },
857 "metric":{
858 "rain":0,
859 "snow":0,
860 "temp":20.72,
861 "windSpeed":17.352
862 },
863 "pressure":1016.78,
864 "timestamp":1437501600,
865 "windDeg":244.003,
866 "windDir":"W"
867 },
868 {
869 "condition":"Clouds",
870 "date":{
871 "date":21,
872 "hours":21,
873 "minutes":0,
874 "month":6,
875 "year":2015
876 },
877 "humidity":68,
878 "icon":"cloud",
879 "imperial":{
880 "rain":0,
881 "snow":0,
882 "temp":65.156,
883 "windSpeed":8.534400000000002
884 },
885 "metric":{
886 "rain":0,
887 "snow":0,
888 "temp":18.42,
889 "windSpeed":13.716000000000001
890 },
891 "pressure":1018.15,
892 "timestamp":1437512400,
893 "windDeg":249.501,
894 "windDir":"W"
895 }
896 ],
897 "humidity":73,
898 "icon":"cloud_sun",
899 "imperial":{
900 "rain":0,
901 "snow":0,
902 "tempMax":70.394,
903 "tempMin":57.938,
904 "windSpeed":18.412800000000004
905 },
906 "metric":{
907 "rain":0,
908 "snow":0,
909 "tempMax":21.33,
910 "tempMin":14.41,
911 "windSpeed":29.592000000000002
912 },
913 "pressure":1016.62,
914 "timestamp":1437480000,
915 "windDeg":233,
916 "windDir":"SW"
917 },
918 {
919 "condition":"Rain",
920 "date":{
921 "date":22,
922 "hours":11,
923 "minutes":59,
924 "month":6,
925 "year":2015
926 },
927 "hourly":[
928 {
929 "condition":"Clouds",
930 "date":{
931 "date":22,
932 "hours":0,
933 "minutes":0,
934 "month":6,
935 "year":2015
936 },
937 "humidity":71,
938 "icon":"cloud",
939 "imperial":{
940 "rain":0,
941 "snow":0,
942 "temp":62.654,
943 "windSpeed":7.4144000000000005
944 },
945 "metric":{
946 "rain":0,
947 "snow":0,
948 "temp":17.03,
949 "windSpeed":11.916
950 },
951 "pressure":1019.51,
952 "timestamp":1437523200,
953 "windDeg":264.503,
954 "windDir":"W"
955 },
956 {
957 "condition":"Clouds",
958 "date":{
959 "date":22,
960 "hours":3,
961 "minutes":0,
962 "month":6,
963 "year":2015
964 },
965 "humidity":78,
966 "icon":"cloud_moon",
967 "imperial":{
968 "rain":0,
969 "snow":0,
970 "temp":57.956,
971 "windSpeed":5.734400000000001
972 },
973 "metric":{
974 "rain":0,
975 "snow":0,
976 "temp":14.42,
977 "windSpeed":9.216000000000001
978 },
979 "pressure":1020.16,
980 "timestamp":1437534000,
981 "windDeg":265.502,
982 "windDir":"W"
983 },
984 {
985 "condition":"Rain",
986 "date":{
987 "date":22,
988 "hours":6,
989 "minutes":0,
990 "month":6,
991 "year":2015
992 },
993 "humidity":79,
994 "icon":"rain",
995 "imperial":{
996 "rain":0.00039370078740157485,
997 "snow":0,
998 "temp":58.964,
999 "windSpeed":4.1664
1000 },
1001 "metric":{
1002 "rain":0.01,
1003 "snow":0,
1004 "temp":14.98,
1005 "windSpeed":6.696000000000001
1006 },
1007 "pressure":1020.7,
1008 "timestamp":1437544800,
1009 "windDeg":257.008,
1010 "windDir":"W"
1011 },
1012 {
1013 "condition":"Rain",
1014 "date":{
1015 "date":22,
1016 "hours":9,
1017 "minutes":0,
1018 "month":6,
1019 "year":2015
1020 },
1021 "humidity":66,
1022 "icon":"rain",
1023 "imperial":{
1024 "rain":0.0007874015748031497,
1025 "snow":0,
1026 "temp":64.274,
1027 "windSpeed":3.9872000000000005
1028 },
1029 "metric":{
1030 "rain":0.02,
1031 "snow":0,
1032 "temp":17.93,
1033 "windSpeed":6.408
1034 },
1035 "pressure":1021.13,
1036 "timestamp":1437555600,
1037 "windDeg":247.5,
1038 "windDir":"W"
1039 },
1040 {
1041 "condition":"Clouds",
1042 "date":{
1043 "date":22,
1044 "hours":12,
1045 "minutes":0,
1046 "month":6,
1047 "year":2015
1048 },
1049 "humidity":61,
1050 "icon":"cloud_sun",
1051 "imperial":{
1052 "rain":0,
1053 "snow":0,
1054 "temp":68.55799999999999,
1055 "windSpeed":5.510400000000001
1056 },
1057 "metric":{
1058 "rain":0,
1059 "snow":0,
1060 "temp":20.31,
1061 "windSpeed":8.856
1062 },
1063 "pressure":1020.74,
1064 "timestamp":1437566400,
1065 "windDeg":227.501,
1066 "windDir":"SW"
1067 },
1068 {
1069 "condition":"Clouds",
1070 "date":{
1071 "date":22,
1072 "hours":15,
1073 "minutes":0,
1074 "month":6,
1075 "year":2015
1076 },
1077 "humidity":56,
1078 "icon":"cloud_sun",
1079 "imperial":{
1080 "rain":0,
1081 "snow":0,
1082 "temp":69.44,
1083 "windSpeed":7.750400000000001
1084 },
1085 "metric":{
1086 "rain":0,
1087 "snow":0,
1088 "temp":20.8,
1089 "windSpeed":12.456
1090 },
1091 "pressure":1019.48,
1092 "timestamp":1437577200,
1093 "windDeg":236.001,
1094 "windDir":"SW"
1095 },
1096 {
1097 "condition":"Clouds",
1098 "date":{
1099 "date":22,
1100 "hours":18,
1101 "minutes":0,
1102 "month":6,
1103 "year":2015
1104 },
1105 "humidity":56,
1106 "icon":"cloud",
1107 "imperial":{
1108 "rain":0,
1109 "snow":0,
1110 "temp":67.19,
1111 "windSpeed":8.512
1112 },
1113 "metric":{
1114 "rain":0,
1115 "snow":0,
1116 "temp":19.55,
1117 "windSpeed":13.68
1118 },
1119 "pressure":1019.42,
1120 "timestamp":1437588000,
1121 "windDeg":258.502,
1122 "windDir":"W"
1123 },
1124 {
1125 "condition":"Rain",
1126 "date":{
1127 "date":22,
1128 "hours":21,
1129 "minutes":0,
1130 "month":6,
1131 "year":2015
1132 },
1133 "humidity":64,
1134 "icon":"rain",
1135 "imperial":{
1136 "rain":0.0007874015748031497,
1137 "snow":0,
1138 "temp":63.35600000000001,
1139 "windSpeed":5.1968000000000005
1140 },
1141 "metric":{
1142 "rain":0.02,
1143 "snow":0,
1144 "temp":17.42,
1145 "windSpeed":8.352
1146 },
1147 "pressure":1020.07,
1148 "timestamp":1437598800,
1149 "windDeg":261.502,
1150 "windDir":"W"
1151 }
1152 ],
1153 "humidity":0,
1154 "icon":"rain",
1155 "imperial":{
1156 "rain":0.07007874015748032,
1157 "snow":0,
1158 "tempMax":70.80799999999999,
1159 "tempMin":58.135999999999996,
1160 "windSpeed":8.736
1161 },
1162 "metric":{
1163 "rain":1.78,
1164 "snow":0,
1165 "tempMax":21.56,
1166 "tempMin":14.52,
1167 "windSpeed":14.04
1168 },
1169 "pressure":1023.19,
1170 "timestamp":1437566400,
1171 "windDeg":219,
1172 "windDir":"SW"
1173 },
1174 {
1175 "condition":"Clear",
1176 "date":{
1177 "date":23,
1178 "hours":11,
1179 "minutes":59,
1180 "month":6,
1181 "year":2015
1182 },
1183 "hourly":[
1184 {
1185 "condition":"Rain",
1186 "date":{
1187 "date":23,
1188 "hours":0,
1189 "minutes":0,
1190 "month":6,
1191 "year":2015
1192 },
1193 "humidity":74,
1194 "icon":"rain",
1195 "imperial":{
1196 "rain":0.003149606299212599,
1197 "snow":0,
1198 "temp":60.908,
1199 "windSpeed":3.2704000000000004
1200 },
1201 "metric":{
1202 "rain":0.08,
1203 "snow":0,
1204 "temp":16.06,
1205 "windSpeed":5.256
1206 },
1207 "pressure":1020.03,
1208 "timestamp":1437609600,
1209 "windDeg":253.504,
1210 "windDir":"W"
1211 },
1212 {
1213 "condition":"Rain",
1214 "date":{
1215 "date":23,
1216 "hours":3,
1217 "minutes":0,
1218 "month":6,
1219 "year":2015
1220 },
1221 "humidity":83,
1222 "icon":"rain",
1223 "imperial":{
1224 "rain":0.005905511811023622,
1225 "snow":0,
1226 "temp":59.054,
1227 "windSpeed":3.4048000000000003
1228 },
1229 "metric":{
1230 "rain":0.15,
1231 "snow":0,
1232 "temp":15.03,
1233 "windSpeed":5.472
1234 },
1235 "pressure":1019.47,
1236 "timestamp":1437620400,
1237 "windDeg":251.501,
1238 "windDir":"W"
1239 },
1240 {
1241 "condition":"Rain",
1242 "date":{
1243 "date":23,
1244 "hours":6,
1245 "minutes":0,
1246 "month":6,
1247 "year":2015
1248 },
1249 "humidity":88,
1250 "icon":"rain",
1251 "imperial":{
1252 "rain":0.006692913385826772,
1253 "snow":0,
1254 "temp":59.054,
1255 "windSpeed":3.4048000000000003
1256 },
1257 "metric":{
1258 "rain":0.17,
1259 "snow":0,
1260 "temp":15.03,
1261 "windSpeed":5.472
1262 },
1263 "pressure":1019.07,
1264 "timestamp":1437631200,
1265 "windDeg":165.001,
1266 "windDir":"S"
1267 },
1268 {
1269 "condition":"Rain",
1270 "date":{
1271 "date":23,
1272 "hours":9,
1273 "minutes":0,
1274 "month":6,
1275 "year":2015
1276 },
1277 "humidity":77,
1278 "icon":"rain",
1279 "imperial":{
1280 "rain":0.0024606299212598425,
1281 "snow":0,
1282 "temp":63.212,
1283 "windSpeed":4.972800000000001
1284 },
1285 "metric":{
1286 "rain":0.0625,
1287 "snow":0,
1288 "temp":17.34,
1289 "windSpeed":7.992000000000001
1290 },
1291 "pressure":1018.4,
1292 "timestamp":1437642000,
1293 "windDeg":199.002,
1294 "windDir":"S"
1295 },
1296 {
1297 "condition":"Clouds",
1298 "date":{
1299 "date":23,
1300 "hours":12,
1301 "minutes":0,
1302 "month":6,
1303 "year":2015
1304 },
1305 "humidity":64,
1306 "icon":"cloud_sun",
1307 "imperial":{
1308 "rain":0,
1309 "snow":0,
1310 "temp":68.27,
1311 "windSpeed":6.7424
1312 },
1313 "metric":{
1314 "rain":0,
1315 "snow":0,
1316 "temp":20.15,
1317 "windSpeed":10.836
1318 },
1319 "pressure":1017.1,
1320 "timestamp":1437652800,
1321 "windDeg":224.501,
1322 "windDir":"SW"
1323 },
1324 {
1325 "condition":"Rain",
1326 "date":{
1327 "date":23,
1328 "hours":15,
1329 "minutes":0,
1330 "month":6,
1331 "year":2015
1332 },
1333 "humidity":62,
1334 "icon":"rain",
1335 "imperial":{
1336 "rain":0.0004921259842519686,
1337 "snow":0,
1338 "temp":67.55000000000001,
1339 "windSpeed":8.4224
1340 },
1341 "metric":{
1342 "rain":0.0125,
1343 "snow":0,
1344 "temp":19.75,
1345 "windSpeed":13.536
1346 },
1347 "pressure":1016.06,
1348 "timestamp":1437663600,
1349 "windDeg":231.501,
1350 "windDir":"SW"
1351 }
1352 ],
1353 "humidity":0,
1354 "icon":"sun",
1355 "imperial":{
1356 "rain":0,
1357 "snow":0,
1358 "tempMax":73.328,
1359 "tempMin":58.064,
1360 "windSpeed":8.601600000000001
1361 },
1362 "metric":{
1363 "rain":0,
1364 "snow":0,
1365 "tempMax":22.96,
1366 "tempMin":14.48,
1367 "windSpeed":13.824
1368 },
1369 "pressure":1023.52,
1370 "timestamp":1437652800,
1371 "windDeg":239,
1372 "windDir":"SW"
1373 },
1374 {
1375 "condition":"Rain",
1376 "date":{
1377 "date":24,
1378 "hours":11,
1379 "minutes":59,
1380 "month":6,
1381 "year":2015
1382 },
1383 "hourly":[
1384
1385 ],
1386 "humidity":0,
1387 "icon":"rain",
1388 "imperial":{
1389 "rain":0.01968503937007874,
1390 "snow":0,
1391 "tempMax":79.07,
1392 "tempMin":63.068000000000005,
1393 "windSpeed":12.1632
1394 },
1395 "metric":{
1396 "rain":0.5,
1397 "snow":0,
1398 "tempMax":26.15,
1399 "tempMin":17.26,
1400 "windSpeed":19.548
1401 },
1402 "pressure":1017.03,
1403 "timestamp":1437739200,
1404 "windDeg":87,
1405 "windDir":"E"
1406 },
1407 {
1408 "condition":"Rain",
1409 "date":{
1410 "date":25,
1411 "hours":11,
1412 "minutes":59,
1413 "month":6,
1414 "year":2015
1415 },
1416 "hourly":[
1417
1418 ],
1419 "humidity":0,
1420 "icon":"rain",
1421 "imperial":{
1422 "rain":0.010629921259842521,
1423 "snow":0,
1424 "tempMax":74.084,
1425 "tempMin":60.025999999999996,
1426 "windSpeed":13.820800000000002
1427 },
1428 "metric":{
1429 "rain":0.27,
1430 "snow":0,
1431 "tempMax":23.38,
1432 "tempMin":15.57,
1433 "windSpeed":22.212
1434 },
1435 "pressure":1015.03,
1436 "timestamp":1437825600,
1437 "windDeg":228,
1438 "windDir":"SW"
1439 },
1440 {
1441 "condition":"Clear",
1442 "date":{
1443 "date":26,
1444 "hours":11,
1445 "minutes":59,
1446 "month":6,
1447 "year":2015
1448 },
1449 "hourly":[
1450
1451 ],
1452 "humidity":0,
1453 "icon":"sun",
1454 "imperial":{
1455 "rain":0,
1456 "snow":0,
1457 "tempMax":70.16,
1458 "tempMin":58.028000000000006,
1459 "windSpeed":17.3824
1460 },
1461 "metric":{
1462 "rain":0,
1463 "snow":0,
1464 "tempMax":21.2,
1465 "tempMin":14.46,
1466 "windSpeed":27.936
1467 },
1468 "pressure":1016.83,
1469 "timestamp":1437912000,
1470 "windDeg":226,
1471 "windDir":"SW"
1472 },
1473 {
1474 "condition":"Rain",
1475 "date":{
1476 "date":27,
1477 "hours":11,
1478 "minutes":59,
1479 "month":6,
1480 "year":2015
1481 },
1482 "hourly":[
1483
1484 ],
1485 "humidity":0,
1486 "icon":"rain",
1487 "imperial":{
1488 "rain":0.031102362204724412,
1489 "snow":0,
1490 "tempMax":69.53,
1491 "tempMin":56.426,
1492 "windSpeed":12.4544
1493 },
1494 "metric":{
1495 "rain":0.79,
1496 "snow":0,
1497 "tempMax":20.85,
1498 "tempMin":13.57,
1499 "windSpeed":20.016
1500 },
1501 "pressure":1017.26,
1502 "timestamp":1437998400,
1503 "windDeg":245,
1504 "windDir":"W"
1505 }
1506 ],
1507 "save":true,
1508 "updated":1437239273904
1509}
01510
=== added file 'tests/autopilot/ubuntu_weather_app/files/2.json'
--- tests/autopilot/ubuntu_weather_app/files/2.json 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/files/2.json 2015-07-25 13:52:29 +0000
@@ -0,0 +1,1509 @@
1{
2 "db":{
3 "id":3,
4 "updated":"2015-07-18T17:06:03.228Z"
5 },
6 "format":20150404,
7 "location":{
8 "objectName":"",
9 "adminName1":"Washington, D.C.",
10 "adminName2":"US.DC.001",
11 "adminName3":"",
12 "areaLabel":"Washington, D.C., United States",
13 "coord":{
14 "lat":"38.89511",
15 "lon":"-77.03637"
16 },
17 "country":"US",
18 "countryName":"United States",
19 "name":"Washington",
20 "population":601723,
21 "services":{
22 "geonames":4140963,
23 "openweathermap":4140963
24 },
25 "timezone":{
26 "dstOffset":-4,
27 "gmtOffset":-5,
28 "timeZoneId":"America/New_York"
29 }
30 },
31 "data":[
32 {
33 "condition":"Rain",
34 "date":{
35 "date":18,
36 "hours":11,
37 "minutes":59,
38 "month":6,
39 "year":2015
40 },
41 "hourly":[
42 {
43 "condition":"Clear",
44 "date":{
45 "date":18,
46 "hours":13,
47 "minutes":0,
48 "month":6,
49 "year":2015
50 },
51 "humidity":72,
52 "icon":"cloud_sun",
53 "imperial":{
54 "rain":0,
55 "snow":0,
56 "temp":85.136,
57 "windSpeed":4.9504
58 },
59 "metric":{
60 "rain":0,
61 "snow":0,
62 "temp":29.52,
63 "windSpeed":7.956
64 },
65 "pressure":1020.23,
66 "timestamp":1437242400,
67 "windDeg":202.008,
68 "windDir":"S"
69 },
70 {
71 "condition":"Clouds",
72 "date":{
73 "date":18,
74 "hours":16,
75 "minutes":0,
76 "month":6,
77 "year":2015
78 },
79 "humidity":64,
80 "icon":"cloud_sun",
81 "imperial":{
82 "rain":0,
83 "snow":0,
84 "temp":86.21600000000001,
85 "windSpeed":6.7424
86 },
87 "metric":{
88 "rain":0,
89 "snow":0,
90 "temp":30.12,
91 "windSpeed":10.836
92 },
93 "pressure":1018.84,
94 "timestamp":1437253200,
95 "windDeg":213.504,
96 "windDir":"SW"
97 },
98 {
99 "condition":"Rain",
100 "date":{
101 "date":18,
102 "hours":19,
103 "minutes":0,
104 "month":6,
105 "year":2015
106 },
107 "humidity":78,
108 "icon":"rain",
109 "imperial":{
110 "rain":0.17874015748031497,
111 "snow":0,
112 "temp":79.7,
113 "windSpeed":4.1888000000000005
114 },
115 "metric":{
116 "rain":4.54,
117 "snow":0,
118 "temp":26.5,
119 "windSpeed":6.732
120 },
121 "pressure":1019.47,
122 "timestamp":1437264000,
123 "windDeg":291.506,
124 "windDir":"W"
125 },
126 {
127 "condition":"Rain",
128 "date":{
129 "date":18,
130 "hours":22,
131 "minutes":0,
132 "month":6,
133 "year":2015
134 },
135 "humidity":88,
136 "icon":"rain",
137 "imperial":{
138 "rain":0.017913385826771655,
139 "snow":0,
140 "temp":75.938,
141 "windSpeed":2.9344000000000006
142 },
143 "metric":{
144 "rain":0.455,
145 "snow":0,
146 "temp":24.41,
147 "windSpeed":4.716
148 },
149 "pressure":1019.87,
150 "timestamp":1437274800,
151 "windDeg":270.502,
152 "windDir":"W"
153 }
154 ],
155 "humidity":72,
156 "icon":"rain",
157 "imperial":{
158 "rain":0.1968503937007874,
159 "snow":0,
160 "tempMax":86.19800000000001,
161 "tempMin":74.35400000000001,
162 "windSpeed":4.9504
163 },
164 "metric":{
165 "rain":5,
166 "snow":0,
167 "tempMax":30.11,
168 "tempMin":23.53,
169 "windSpeed":7.956
170 },
171 "pressure":1020.23,
172 "timestamp":1437238800,
173 "windDeg":202,
174 "windDir":"S",
175 "current":{
176 "condition":"Rain",
177 "date":{
178 "date":18,
179 "hours":11,
180 "minutes":59,
181 "month":6,
182 "year":2015
183 },
184 "humidity":88,
185 "icon":"rain",
186 "imperial":{
187 "rain":0,
188 "snow":0,
189 "temp":78.314,
190 "windSpeed":5.824000000000001
191 },
192 "metric":{
193 "rain":0,
194 "snow":0,
195 "temp":25.73,
196 "windSpeed":9.360000000000001
197 },
198 "pressure":1016,
199 "timestamp":1437236981,
200 "windDeg":270,
201 "windDir":"W",
202 "service":"openweathermap",
203 "service_id":4140963
204 }
205 },
206 {
207 "condition":"Clear",
208 "date":{
209 "date":19,
210 "hours":11,
211 "minutes":59,
212 "month":6,
213 "year":2015
214 },
215 "hourly":[
216 {
217 "condition":"Clear",
218 "date":{
219 "date":19,
220 "hours":1,
221 "minutes":0,
222 "month":6,
223 "year":2015
224 },
225 "humidity":95,
226 "icon":"moon",
227 "imperial":{
228 "rain":0,
229 "snow":0,
230 "temp":74.35400000000001,
231 "windSpeed":2.7104000000000004
232 },
233 "metric":{
234 "rain":0,
235 "snow":0,
236 "temp":23.53,
237 "windSpeed":4.356
238 },
239 "pressure":1019.41,
240 "timestamp":1437285600,
241 "windDeg":254.502,
242 "windDir":"W"
243 },
244 {
245 "condition":"Clear",
246 "date":{
247 "date":19,
248 "hours":4,
249 "minutes":0,
250 "month":6,
251 "year":2015
252 },
253 "humidity":92,
254 "icon":"moon",
255 "imperial":{
256 "rain":0,
257 "snow":0,
258 "temp":73.094,
259 "windSpeed":2.9344000000000006
260 },
261 "metric":{
262 "rain":0,
263 "snow":0,
264 "temp":22.83,
265 "windSpeed":4.716
266 },
267 "pressure":1019.25,
268 "timestamp":1437296400,
269 "windDeg":286.5,
270 "windDir":"W"
271 },
272 {
273 "condition":"Clear",
274 "date":{
275 "date":19,
276 "hours":7,
277 "minutes":0,
278 "month":6,
279 "year":2015
280 },
281 "humidity":84,
282 "icon":"sun",
283 "imperial":{
284 "rain":0,
285 "snow":0,
286 "temp":80.564,
287 "windSpeed":5.219200000000001
288 },
289 "metric":{
290 "rain":0,
291 "snow":0,
292 "temp":26.98,
293 "windSpeed":8.388
294 },
295 "pressure":1019.67,
296 "timestamp":1437307200,
297 "windDeg":311.005,
298 "windDir":"NW"
299 },
300 {
301 "condition":"Clear",
302 "date":{
303 "date":19,
304 "hours":10,
305 "minutes":0,
306 "month":6,
307 "year":2015
308 },
309 "humidity":82,
310 "icon":"sun",
311 "imperial":{
312 "rain":0,
313 "snow":0,
314 "temp":87.25999999999999,
315 "windSpeed":3.9424000000000006
316 },
317 "metric":{
318 "rain":0,
319 "snow":0,
320 "temp":30.7,
321 "windSpeed":6.336
322 },
323 "pressure":1019.85,
324 "timestamp":1437318000,
325 "windDeg":332.001,
326 "windDir":"N"
327 },
328 {
329 "condition":"Clear",
330 "date":{
331 "date":19,
332 "hours":13,
333 "minutes":0,
334 "month":6,
335 "year":2015
336 },
337 "humidity":74,
338 "icon":"sun",
339 "imperial":{
340 "rain":0,
341 "snow":0,
342 "temp":90.536,
343 "windSpeed":3.7408
344 },
345 "metric":{
346 "rain":0,
347 "snow":0,
348 "temp":32.52,
349 "windSpeed":6.012
350 },
351 "pressure":1018.93,
352 "timestamp":1437328800,
353 "windDeg":307.502,
354 "windDir":"NW"
355 },
356 {
357 "condition":"Clear",
358 "date":{
359 "date":19,
360 "hours":16,
361 "minutes":0,
362 "month":6,
363 "year":2015
364 },
365 "humidity":67,
366 "icon":"sun",
367 "imperial":{
368 "rain":0,
369 "snow":0,
370 "temp":91.904,
371 "windSpeed":3.7632000000000003
372 },
373 "metric":{
374 "rain":0,
375 "snow":0,
376 "temp":33.28,
377 "windSpeed":6.048
378 },
379 "pressure":1016.96,
380 "timestamp":1437339600,
381 "windDeg":268.003,
382 "windDir":"W"
383 },
384 {
385 "condition":"Clear",
386 "date":{
387 "date":19,
388 "hours":19,
389 "minutes":0,
390 "month":6,
391 "year":2015
392 },
393 "humidity":68,
394 "icon":"cloud_moon",
395 "imperial":{
396 "rain":0,
397 "snow":0,
398 "temp":88.78999999999999,
399 "windSpeed":4.144000000000001
400 },
401 "metric":{
402 "rain":0,
403 "snow":0,
404 "temp":31.55,
405 "windSpeed":6.66
406 },
407 "pressure":1016.48,
408 "timestamp":1437350400,
409 "windDeg":242.008,
410 "windDir":"W"
411 },
412 {
413 "condition":"Clouds",
414 "date":{
415 "date":19,
416 "hours":22,
417 "minutes":0,
418 "month":6,
419 "year":2015
420 },
421 "humidity":72,
422 "icon":"cloud_moon",
423 "imperial":{
424 "rain":0,
425 "snow":0,
426 "temp":83.48,
427 "windSpeed":6.2944
428 },
429 "metric":{
430 "rain":0,
431 "snow":0,
432 "temp":28.6,
433 "windSpeed":10.116
434 },
435 "pressure":1016.51,
436 "timestamp":1437361200,
437 "windDeg":218.504,
438 "windDir":"SW"
439 }
440 ],
441 "humidity":74,
442 "icon":"sun",
443 "imperial":{
444 "rain":0,
445 "snow":0,
446 "tempMax":91.904,
447 "tempMin":80.564,
448 "windSpeed":3.7408
449 },
450 "metric":{
451 "rain":0,
452 "snow":0,
453 "tempMax":33.28,
454 "tempMin":26.98,
455 "windSpeed":6.012
456 },
457 "pressure":1018.93,
458 "timestamp":1437325200,
459 "windDeg":308,
460 "windDir":"NW"
461 },
462 {
463 "condition":"Rain",
464 "date":{
465 "date":20,
466 "hours":11,
467 "minutes":59,
468 "month":6,
469 "year":2015
470 },
471 "hourly":[
472 {
473 "condition":"Clouds",
474 "date":{
475 "date":20,
476 "hours":1,
477 "minutes":0,
478 "month":6,
479 "year":2015
480 },
481 "humidity":77,
482 "icon":"cloud_moon",
483 "imperial":{
484 "rain":0,
485 "snow":0,
486 "temp":81.5,
487 "windSpeed":5.7568
488 },
489 "metric":{
490 "rain":0,
491 "snow":0,
492 "temp":27.5,
493 "windSpeed":9.251999999999999
494 },
495 "pressure":1015.89,
496 "timestamp":1437372000,
497 "windDeg":245.501,
498 "windDir":"W"
499 },
500 {
501 "condition":"Clouds",
502 "date":{
503 "date":20,
504 "hours":4,
505 "minutes":0,
506 "month":6,
507 "year":2015
508 },
509 "humidity":76,
510 "icon":"cloud_moon",
511 "imperial":{
512 "rain":0,
513 "snow":0,
514 "temp":80.06,
515 "windSpeed":4.748800000000001
516 },
517 "metric":{
518 "rain":0,
519 "snow":0,
520 "temp":26.7,
521 "windSpeed":7.632000000000001
522 },
523 "pressure":1014.8,
524 "timestamp":1437382800,
525 "windDeg":257,
526 "windDir":"W"
527 },
528 {
529 "condition":"Rain",
530 "date":{
531 "date":20,
532 "hours":7,
533 "minutes":0,
534 "month":6,
535 "year":2015
536 },
537 "humidity":100,
538 "icon":"rain",
539 "imperial":{
540 "rain":0.17775590551181103,
541 "snow":0,
542 "temp":72.356,
543 "windSpeed":5.958400000000001
544 },
545 "metric":{
546 "rain":4.515,
547 "snow":0,
548 "temp":22.42,
549 "windSpeed":9.576
550 },
551 "pressure":1016.79,
552 "timestamp":1437393600,
553 "windDeg":296.501,
554 "windDir":"W"
555 },
556 {
557 "condition":"Clouds",
558 "date":{
559 "date":20,
560 "hours":10,
561 "minutes":0,
562 "month":6,
563 "year":2015
564 },
565 "humidity":97,
566 "icon":"cloud_sun",
567 "imperial":{
568 "rain":0,
569 "snow":0,
570 "temp":79.268,
571 "windSpeed":5.958400000000001
572 },
573 "metric":{
574 "rain":0,
575 "snow":0,
576 "temp":26.26,
577 "windSpeed":9.576
578 },
579 "pressure":1016.6,
580 "timestamp":1437404400,
581 "windDeg":277.502,
582 "windDir":"W"
583 },
584 {
585 "condition":"Clear",
586 "date":{
587 "date":20,
588 "hours":13,
589 "minutes":0,
590 "month":6,
591 "year":2015
592 },
593 "humidity":79,
594 "icon":"sun",
595 "imperial":{
596 "rain":0,
597 "snow":0,
598 "temp":87.656,
599 "windSpeed":6.7424
600 },
601 "metric":{
602 "rain":0,
603 "snow":0,
604 "temp":30.92,
605 "windSpeed":10.836
606 },
607 "pressure":1014.93,
608 "timestamp":1437415200,
609 "windDeg":294.502,
610 "windDir":"W"
611 },
612 {
613 "condition":"Clear",
614 "date":{
615 "date":20,
616 "hours":16,
617 "minutes":0,
618 "month":6,
619 "year":2015
620 },
621 "humidity":67,
622 "icon":"cloud_sun",
623 "imperial":{
624 "rain":0,
625 "snow":0,
626 "temp":88.97,
627 "windSpeed":8.668800000000001
628 },
629 "metric":{
630 "rain":0,
631 "snow":0,
632 "temp":31.65,
633 "windSpeed":13.932
634 },
635 "pressure":1013.88,
636 "timestamp":1437426000,
637 "windDeg":298.006,
638 "windDir":"W"
639 },
640 {
641 "condition":"Clear",
642 "date":{
643 "date":20,
644 "hours":19,
645 "minutes":0,
646 "month":6,
647 "year":2015
648 },
649 "humidity":65,
650 "icon":"moon",
651 "imperial":{
652 "rain":0,
653 "snow":0,
654 "temp":83.98400000000001,
655 "windSpeed":5.510400000000001
656 },
657 "metric":{
658 "rain":0,
659 "snow":0,
660 "temp":28.88,
661 "windSpeed":8.856
662 },
663 "pressure":1014.36,
664 "timestamp":1437436800,
665 "windDeg":322.503,
666 "windDir":"NW"
667 },
668 {
669 "condition":"Clouds",
670 "date":{
671 "date":20,
672 "hours":22,
673 "minutes":0,
674 "month":6,
675 "year":2015
676 },
677 "humidity":66,
678 "icon":"cloud_moon",
679 "imperial":{
680 "rain":0,
681 "snow":0,
682 "temp":76.244,
683 "windSpeed":6.384000000000001
684 },
685 "metric":{
686 "rain":0,
687 "snow":0,
688 "temp":24.58,
689 "windSpeed":10.26
690 },
691 "pressure":1015.65,
692 "timestamp":1437447600,
693 "windDeg":341.502,
694 "windDir":"N"
695 }
696 ],
697 "humidity":79,
698 "icon":"rain",
699 "imperial":{
700 "rain":0.1779527559055118,
701 "snow":0,
702 "tempMax":88.97,
703 "tempMin":72.24799999999999,
704 "windSpeed":6.7424
705 },
706 "metric":{
707 "rain":4.52,
708 "snow":0,
709 "tempMax":31.65,
710 "tempMin":22.36,
711 "windSpeed":10.836
712 },
713 "pressure":1014.93,
714 "timestamp":1437411600,
715 "windDeg":295,
716 "windDir":"W"
717 },
718 {
719 "condition":"Rain",
720 "date":{
721 "date":21,
722 "hours":11,
723 "minutes":59,
724 "month":6,
725 "year":2015
726 },
727 "hourly":[
728 {
729 "condition":"Clouds",
730 "date":{
731 "date":21,
732 "hours":1,
733 "minutes":0,
734 "month":6,
735 "year":2015
736 },
737 "humidity":70,
738 "icon":"cloud_moon",
739 "imperial":{
740 "rain":0,
741 "snow":0,
742 "temp":72.24799999999999,
743 "windSpeed":6.339200000000001
744 },
745 "metric":{
746 "rain":0,
747 "snow":0,
748 "temp":22.36,
749 "windSpeed":10.188
750 },
751 "pressure":1015.63,
752 "timestamp":1437458400,
753 "windDeg":320.002,
754 "windDir":"NW"
755 },
756 {
757 "condition":"Clouds",
758 "date":{
759 "date":21,
760 "hours":4,
761 "minutes":0,
762 "month":6,
763 "year":2015
764 },
765 "humidity":80,
766 "icon":"cloud",
767 "imperial":{
768 "rain":0,
769 "snow":0,
770 "temp":69.94399999999999,
771 "windSpeed":3.0240000000000005
772 },
773 "metric":{
774 "rain":0,
775 "snow":0,
776 "temp":21.08,
777 "windSpeed":4.86
778 },
779 "pressure":1015.59,
780 "timestamp":1437469200,
781 "windDeg":300.501,
782 "windDir":"NW"
783 },
784 {
785 "condition":"Clouds",
786 "date":{
787 "date":21,
788 "hours":7,
789 "minutes":0,
790 "month":6,
791 "year":2015
792 },
793 "humidity":80,
794 "icon":"cloud_sun",
795 "imperial":{
796 "rain":0,
797 "snow":0,
798 "temp":76.04599999999999,
799 "windSpeed":3.7408
800 },
801 "metric":{
802 "rain":0,
803 "snow":0,
804 "temp":24.47,
805 "windSpeed":6.012
806 },
807 "pressure":1015.89,
808 "timestamp":1437480000,
809 "windDeg":299.008,
810 "windDir":"W"
811 },
812 {
813 "condition":"Clouds",
814 "date":{
815 "date":21,
816 "hours":10,
817 "minutes":0,
818 "month":6,
819 "year":2015
820 },
821 "humidity":76,
822 "icon":"cloud_sun",
823 "imperial":{
824 "rain":0,
825 "snow":0,
826 "temp":83.26400000000001,
827 "windSpeed":3.9424000000000006
828 },
829 "metric":{
830 "rain":0,
831 "snow":0,
832 "temp":28.48,
833 "windSpeed":6.336
834 },
835 "pressure":1015.73,
836 "timestamp":1437490800,
837 "windDeg":295.5,
838 "windDir":"W"
839 },
840 {
841 "condition":"Clouds",
842 "date":{
843 "date":21,
844 "hours":13,
845 "minutes":0,
846 "month":6,
847 "year":2015
848 },
849 "humidity":70,
850 "icon":"cloud_sun",
851 "imperial":{
852 "rain":0,
853 "snow":0,
854 "temp":86.036,
855 "windSpeed":3.6288000000000005
856 },
857 "metric":{
858 "rain":0,
859 "snow":0,
860 "temp":30.02,
861 "windSpeed":5.832000000000001
862 },
863 "pressure":1014.18,
864 "timestamp":1437501600,
865 "windDeg":264.503,
866 "windDir":"W"
867 },
868 {
869 "condition":"Clouds",
870 "date":{
871 "date":21,
872 "hours":16,
873 "minutes":0,
874 "month":6,
875 "year":2015
876 },
877 "humidity":62,
878 "icon":"cloud",
879 "imperial":{
880 "rain":0,
881 "snow":0,
882 "temp":86.30600000000001,
883 "windSpeed":5.3984000000000005
884 },
885 "metric":{
886 "rain":0,
887 "snow":0,
888 "temp":30.17,
889 "windSpeed":8.676
890 },
891 "pressure":1013.37,
892 "timestamp":1437512400,
893 "windDeg":243.501,
894 "windDir":"W"
895 },
896 {
897 "condition":"Rain",
898 "date":{
899 "date":21,
900 "hours":19,
901 "minutes":0,
902 "month":6,
903 "year":2015
904 },
905 "humidity":93,
906 "icon":"rain",
907 "imperial":{
908 "rain":0.06850393700787402,
909 "snow":0,
910 "temp":72.73400000000001,
911 "windSpeed":6.1824
912 },
913 "metric":{
914 "rain":1.74,
915 "snow":0,
916 "temp":22.63,
917 "windSpeed":9.936
918 },
919 "pressure":1014.16,
920 "timestamp":1437523200,
921 "windDeg":236.003,
922 "windDir":"SW"
923 },
924 {
925 "condition":"Clear",
926 "date":{
927 "date":21,
928 "hours":22,
929 "minutes":0,
930 "month":6,
931 "year":2015
932 },
933 "humidity":93,
934 "icon":"cloud_moon",
935 "imperial":{
936 "rain":0,
937 "snow":0,
938 "temp":70.646,
939 "windSpeed":3.9424000000000006
940 },
941 "metric":{
942 "rain":0,
943 "snow":0,
944 "temp":21.47,
945 "windSpeed":6.336
946 },
947 "pressure":1014.32,
948 "timestamp":1437534000,
949 "windDeg":249.502,
950 "windDir":"W"
951 }
952 ],
953 "humidity":0,
954 "icon":"rain",
955 "imperial":{
956 "rain":0,
957 "snow":0,
958 "tempMax":83.53399999999999,
959 "tempMin":73.45400000000001,
960 "windSpeed":6.496
961 },
962 "metric":{
963 "rain":0,
964 "snow":0,
965 "tempMax":28.63,
966 "tempMin":23.03,
967 "windSpeed":10.44
968 },
969 "pressure":1012.07,
970 "timestamp":1437498000,
971 "windDeg":317,
972 "windDir":"NW"
973 },
974 {
975 "condition":"Rain",
976 "date":{
977 "date":22,
978 "hours":11,
979 "minutes":59,
980 "month":6,
981 "year":2015
982 },
983 "hourly":[
984 {
985 "condition":"Clear",
986 "date":{
987 "date":22,
988 "hours":1,
989 "minutes":0,
990 "month":6,
991 "year":2015
992 },
993 "humidity":94,
994 "icon":"moon",
995 "imperial":{
996 "rain":0,
997 "snow":0,
998 "temp":69.044,
999 "windSpeed":3.7184000000000004
1000 },
1001 "metric":{
1002 "rain":0,
1003 "snow":0,
1004 "temp":20.58,
1005 "windSpeed":5.976
1006 },
1007 "pressure":1013.97,
1008 "timestamp":1437544800,
1009 "windDeg":253.008,
1010 "windDir":"W"
1011 },
1012 {
1013 "condition":"Clear",
1014 "date":{
1015 "date":22,
1016 "hours":4,
1017 "minutes":0,
1018 "month":6,
1019 "year":2015
1020 },
1021 "humidity":94,
1022 "icon":"cloud_moon",
1023 "imperial":{
1024 "rain":0,
1025 "snow":0,
1026 "temp":68.054,
1027 "windSpeed":3.2032000000000003
1028 },
1029 "metric":{
1030 "rain":0,
1031 "snow":0,
1032 "temp":20.03,
1033 "windSpeed":5.148
1034 },
1035 "pressure":1013.68,
1036 "timestamp":1437555600,
1037 "windDeg":237,
1038 "windDir":"SW"
1039 },
1040 {
1041 "condition":"Clouds",
1042 "date":{
1043 "date":22,
1044 "hours":7,
1045 "minutes":0,
1046 "month":6,
1047 "year":2015
1048 },
1049 "humidity":88,
1050 "icon":"cloud_sun",
1051 "imperial":{
1052 "rain":0,
1053 "snow":0,
1054 "temp":72.518,
1055 "windSpeed":4.1664
1056 },
1057 "metric":{
1058 "rain":0,
1059 "snow":0,
1060 "temp":22.51,
1061 "windSpeed":6.696000000000001
1062 },
1063 "pressure":1014.42,
1064 "timestamp":1437566400,
1065 "windDeg":269.501,
1066 "windDir":"W"
1067 },
1068 {
1069 "condition":"Clouds",
1070 "date":{
1071 "date":22,
1072 "hours":10,
1073 "minutes":0,
1074 "month":6,
1075 "year":2015
1076 },
1077 "humidity":83,
1078 "icon":"cloud_sun",
1079 "imperial":{
1080 "rain":0,
1081 "snow":0,
1082 "temp":81.05000000000001,
1083 "windSpeed":3.9424000000000006
1084 },
1085 "metric":{
1086 "rain":0,
1087 "snow":0,
1088 "temp":27.25,
1089 "windSpeed":6.336
1090 },
1091 "pressure":1015.19,
1092 "timestamp":1437577200,
1093 "windDeg":7.50089,
1094 "windDir":"N"
1095 },
1096 {
1097 "condition":"Clouds",
1098 "date":{
1099 "date":22,
1100 "hours":13,
1101 "minutes":0,
1102 "month":6,
1103 "year":2015
1104 },
1105 "humidity":76,
1106 "icon":"cloud_sun",
1107 "imperial":{
1108 "rain":0,
1109 "snow":0,
1110 "temp":84.28999999999999,
1111 "windSpeed":4.032000000000001
1112 },
1113 "metric":{
1114 "rain":0,
1115 "snow":0,
1116 "temp":29.05,
1117 "windSpeed":6.48
1118 },
1119 "pressure":1014.88,
1120 "timestamp":1437588000,
1121 "windDeg":24.0016,
1122 "windDir":"N"
1123 },
1124 {
1125 "condition":"Clouds",
1126 "date":{
1127 "date":22,
1128 "hours":16,
1129 "minutes":0,
1130 "month":6,
1131 "year":2015
1132 },
1133 "humidity":68,
1134 "icon":"cloud",
1135 "imperial":{
1136 "rain":0,
1137 "snow":0,
1138 "temp":84.146,
1139 "windSpeed":3.8528000000000002
1140 },
1141 "metric":{
1142 "rain":0,
1143 "snow":0,
1144 "temp":28.97,
1145 "windSpeed":6.192
1146 },
1147 "pressure":1014.72,
1148 "timestamp":1437598800,
1149 "windDeg":331.502,
1150 "windDir":"N"
1151 },
1152 {
1153 "condition":"Clouds",
1154 "date":{
1155 "date":22,
1156 "hours":19,
1157 "minutes":0,
1158 "month":6,
1159 "year":2015
1160 },
1161 "humidity":69,
1162 "icon":"cloud",
1163 "imperial":{
1164 "rain":0,
1165 "snow":0,
1166 "temp":82.05799999999999,
1167 "windSpeed":3.8304000000000005
1168 },
1169 "metric":{
1170 "rain":0,
1171 "snow":0,
1172 "temp":27.81,
1173 "windSpeed":6.156
1174 },
1175 "pressure":1015.49,
1176 "timestamp":1437609600,
1177 "windDeg":310.004,
1178 "windDir":"NW"
1179 },
1180 {
1181 "condition":"Rain",
1182 "date":{
1183 "date":22,
1184 "hours":22,
1185 "minutes":0,
1186 "month":6,
1187 "year":2015
1188 },
1189 "humidity":72,
1190 "icon":"rain",
1191 "imperial":{
1192 "rain":0.0011811023622047244,
1193 "snow":0,
1194 "temp":78.044,
1195 "windSpeed":5.1968000000000005
1196 },
1197 "metric":{
1198 "rain":0.03,
1199 "snow":0,
1200 "temp":25.58,
1201 "windSpeed":8.352
1202 },
1203 "pressure":1017.2,
1204 "timestamp":1437620400,
1205 "windDeg":339.001,
1206 "windDir":"N"
1207 }
1208 ],
1209 "humidity":0,
1210 "icon":"rain",
1211 "imperial":{
1212 "rain":0.042913385826771656,
1213 "snow":0,
1214 "tempMax":83.31800000000001,
1215 "tempMin":73.274,
1216 "windSpeed":2.0608000000000004
1217 },
1218 "metric":{
1219 "rain":1.09,
1220 "snow":0,
1221 "tempMax":28.51,
1222 "tempMin":22.93,
1223 "windSpeed":3.3120000000000003
1224 },
1225 "pressure":1013.42,
1226 "timestamp":1437584400,
1227 "windDeg":286,
1228 "windDir":"W"
1229 },
1230 {
1231 "condition":"Rain",
1232 "date":{
1233 "date":23,
1234 "hours":11,
1235 "minutes":59,
1236 "month":6,
1237 "year":2015
1238 },
1239 "hourly":[
1240 {
1241 "condition":"Clouds",
1242 "date":{
1243 "date":23,
1244 "hours":1,
1245 "minutes":0,
1246 "month":6,
1247 "year":2015
1248 },
1249 "humidity":83,
1250 "icon":"cloud_moon",
1251 "imperial":{
1252 "rain":0,
1253 "snow":0,
1254 "temp":73.904,
1255 "windSpeed":3.7408
1256 },
1257 "metric":{
1258 "rain":0,
1259 "snow":0,
1260 "temp":23.28,
1261 "windSpeed":6.012
1262 },
1263 "pressure":1017.28,
1264 "timestamp":1437631200,
1265 "windDeg":342.501,
1266 "windDir":"N"
1267 },
1268 {
1269 "condition":"Clear",
1270 "date":{
1271 "date":23,
1272 "hours":4,
1273 "minutes":0,
1274 "month":6,
1275 "year":2015
1276 },
1277 "humidity":94,
1278 "icon":"moon",
1279 "imperial":{
1280 "rain":0,
1281 "snow":0,
1282 "temp":70.142,
1283 "windSpeed":2.7328
1284 },
1285 "metric":{
1286 "rain":0,
1287 "snow":0,
1288 "temp":21.19,
1289 "windSpeed":4.392
1290 },
1291 "pressure":1017.75,
1292 "timestamp":1437642000,
1293 "windDeg":299.502,
1294 "windDir":"W"
1295 },
1296 {
1297 "condition":"Clouds",
1298 "date":{
1299 "date":23,
1300 "hours":7,
1301 "minutes":0,
1302 "month":6,
1303 "year":2015
1304 },
1305 "humidity":80,
1306 "icon":"cloud",
1307 "imperial":{
1308 "rain":0,
1309 "snow":0,
1310 "temp":72.59,
1311 "windSpeed":7.638400000000001
1312 },
1313 "metric":{
1314 "rain":0,
1315 "snow":0,
1316 "temp":22.55,
1317 "windSpeed":12.276000000000002
1318 },
1319 "pressure":1019.29,
1320 "timestamp":1437652800,
1321 "windDeg":348.501,
1322 "windDir":"N"
1323 },
1324 {
1325 "condition":"Clouds",
1326 "date":{
1327 "date":23,
1328 "hours":10,
1329 "minutes":0,
1330 "month":6,
1331 "year":2015
1332 },
1333 "humidity":74,
1334 "icon":"cloud",
1335 "imperial":{
1336 "rain":0,
1337 "snow":0,
1338 "temp":77.36,
1339 "windSpeed":6.1824
1340 },
1341 "metric":{
1342 "rain":0,
1343 "snow":0,
1344 "temp":25.2,
1345 "windSpeed":9.936
1346 },
1347 "pressure":1020.11,
1348 "timestamp":1437663600,
1349 "windDeg":19.0006,
1350 "windDir":"N"
1351 }
1352 ],
1353 "humidity":0,
1354 "icon":"rain",
1355 "imperial":{
1356 "rain":0.020866141732283468,
1357 "snow":0,
1358 "tempMax":84.758,
1359 "tempMin":73.328,
1360 "windSpeed":7.548800000000001
1361 },
1362 "metric":{
1363 "rain":0.53,
1364 "snow":0,
1365 "tempMax":29.31,
1366 "tempMin":22.96,
1367 "windSpeed":12.132000000000001
1368 },
1369 "pressure":1016.1,
1370 "timestamp":1437670800,
1371 "windDeg":327,
1372 "windDir":"NW"
1373 },
1374 {
1375 "condition":"Rain",
1376 "date":{
1377 "date":24,
1378 "hours":11,
1379 "minutes":59,
1380 "month":6,
1381 "year":2015
1382 },
1383 "hourly":[
1384
1385 ],
1386 "humidity":0,
1387 "icon":"rain",
1388 "imperial":{
1389 "rain":0.013779527559055118,
1390 "snow":0,
1391 "tempMax":87.17,
1392 "tempMin":74.12,
1393 "windSpeed":5.6896
1394 },
1395 "metric":{
1396 "rain":0.35,
1397 "snow":0,
1398 "tempMax":30.65,
1399 "tempMin":23.4,
1400 "windSpeed":9.144
1401 },
1402 "pressure":1017.79,
1403 "timestamp":1437757200,
1404 "windDeg":234,
1405 "windDir":"SW"
1406 },
1407 {
1408 "condition":"Rain",
1409 "date":{
1410 "date":25,
1411 "hours":11,
1412 "minutes":59,
1413 "month":6,
1414 "year":2015
1415 },
1416 "hourly":[
1417
1418 ],
1419 "humidity":0,
1420 "icon":"rain",
1421 "imperial":{
1422 "rain":0.13385826771653545,
1423 "snow":0,
1424 "tempMax":94.334,
1425 "tempMin":80.114,
1426 "windSpeed":8.5792
1427 },
1428 "metric":{
1429 "rain":3.4,
1430 "snow":0,
1431 "tempMax":34.63,
1432 "tempMin":26.73,
1433 "windSpeed":13.788
1434 },
1435 "pressure":1012.93,
1436 "timestamp":1437843600,
1437 "windDeg":233,
1438 "windDir":"SW"
1439 },
1440 {
1441 "condition":"Rain",
1442 "date":{
1443 "date":26,
1444 "hours":11,
1445 "minutes":59,
1446 "month":6,
1447 "year":2015
1448 },
1449 "hourly":[
1450
1451 ],
1452 "humidity":0,
1453 "icon":"rain",
1454 "imperial":{
1455 "rain":0.01141732283464567,
1456 "snow":0,
1457 "tempMax":93.02,
1458 "tempMin":77.756,
1459 "windSpeed":7.750400000000001
1460 },
1461 "metric":{
1462 "rain":0.29,
1463 "snow":0,
1464 "tempMax":33.9,
1465 "tempMin":25.42,
1466 "windSpeed":12.456
1467 },
1468 "pressure":1011.84,
1469 "timestamp":1437930000,
1470 "windDeg":271,
1471 "windDir":"W"
1472 },
1473 {
1474 "condition":"Rain",
1475 "date":{
1476 "date":27,
1477 "hours":11,
1478 "minutes":59,
1479 "month":6,
1480 "year":2015
1481 },
1482 "hourly":[
1483
1484 ],
1485 "humidity":0,
1486 "icon":"rain",
1487 "imperial":{
1488 "rain":0.25826771653543307,
1489 "snow":0,
1490 "tempMax":93.506,
1491 "tempMin":77,
1492 "windSpeed":5.443200000000001
1493 },
1494 "metric":{
1495 "rain":6.56,
1496 "snow":0,
1497 "tempMax":34.17,
1498 "tempMin":25,
1499 "windSpeed":8.748000000000001
1500 },
1501 "pressure":1011.02,
1502 "timestamp":1438016400,
1503 "windDeg":182,
1504 "windDir":"S"
1505 }
1506 ],
1507 "save":true,
1508 "updated":1437239163515
1509}
01510
=== added file 'tests/autopilot/ubuntu_weather_app/files/CMakeLists.txt'
--- tests/autopilot/ubuntu_weather_app/files/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/files/CMakeLists.txt 2015-07-25 13:52:29 +0000
@@ -0,0 +1,6 @@
1# make the data files visible on qtcreator
2file(GLOB PYTHON_TEST_RESOURCE_FILES
3 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
4 *.json)
5
6add_custom_target(ubuntu-weather-app_PYTHONTestResourceFiles ALL SOURCES ${PYTHON_TEST_RESOURCE_FILES})
07
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/__init__.py'
--- tests/autopilot/ubuntu_weather_app/tests/__init__.py 2015-06-03 17:49:50 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/__init__.py 2015-07-25 13:52:29 +0000
@@ -19,12 +19,17 @@
19import os19import os
20import os.path20import os.path
21import shutil21import shutil
22import sqlite3
23import time
22import logging24import logging
2325
24import fixtures26import fixtures
25from ubuntu_weather_app import UbuntuWeatherApp27from ubuntu_weather_app import UbuntuWeatherApp
28import ubuntu_weather_app
2629
27from autopilot import logging as autopilot_logging30from autopilot import logging as autopilot_logging
31from autopilot.matchers import Eventually
32from testtools.matchers import Equals
28from autopilot.testcase import AutopilotTestCase33from autopilot.testcase import AutopilotTestCase
2934
30import ubuntuuitoolkit35import ubuntuuitoolkit
@@ -138,13 +143,123 @@
138 newvalue=temp_dir))143 newvalue=temp_dir))
139144
140 logger.debug("Patched home to fake home directory %s" % temp_dir)145 logger.debug("Patched home to fake home directory %s" % temp_dir)
146
141 return temp_dir147 return temp_dir
142148
143149
144class UbuntuWeatherAppTestCase(BaseTestCaseWithPatchedHome):150class DatabaseMixin(object):
151
152 """
153 Helper functions for dealing with sqlite databases
154 """
155
156 def _execute_sql(self, statement):
157 conn = sqlite3.connect(self.db_path)
158 cursor = conn.cursor()
159 logger.debug("Executing sql")
160 logger.debug(statement)
161 cursor.execute(statement)
162 conn.commit()
163 conn.close()
164
165 def add_locations_to_database(self, limit=None):
166 locations = self.get_locations_data()
167 conn = sqlite3.connect(self.db_path)
168 cursor = conn.cursor()
169 logger.debug("Adding locations to database")
170
171 for loc_data in locations:
172 db_exec = "INSERT INTO Locations(date, data) VALUES('{}', '{}')"
173 cursor.execute(db_exec.format(
174 int(time.time() * 1000), loc_data))
175 conn.commit()
176
177 conn.close()
178
179 def clean_db(self):
180 logger.debug("Removing existing database at %s" % self.db_dir)
181
182 try:
183 shutil.rmtree(self.db_dir)
184 except OSError:
185 logger.debug("Could not remove existing database")
186 pass
187
188 def create_blank_db(self):
189 self.clean_db()
190
191 # create blank db
192 database_tmpl_dir = os.path.join(
193 os.path.dirname(ubuntu_weather_app.__file__),
194 'databases')
195 logger.debug("Creating blank db on filesystem %s" % self.db_dir)
196
197 if not os.path.exists(self.app_dir):
198 os.makedirs(self.app_dir)
199
200 shutil.copytree(database_tmpl_dir, self.db_dir)
201
202 self.assertThat(
203 lambda: os.path.exists(self.db_path),
204 Eventually(Equals(True)))
205
206 # this needs to stay in sync with Storage.qml enties
207 logger.debug("Creating locations and settings tables")
208 self._execute_sql("CREATE TABLE IF NOT EXISTS Locations(id INTEGER "
209 "PRIMARY KEY AUTOINCREMENT, data TEXT, date TEXT)")
210
211 self._execute_sql("CREATE TABLE IF NOT EXISTS settings(key TEXT "
212 "UNIQUE, value TEXT)")
213
214 def get_locations_data(self):
215 result = []
216 json_files = [self.json_path + '/1.json', self.json_path + '/2.json']
217
218 for path in json_files:
219 with open(path) as fh:
220 json_str = fh.read()
221 result.append(json_str.strip())
222 fh.close()
223
224 return result
225
226 def load_vars(self):
227 self.app_dir = os.path.join(
228 os.environ.get('HOME'),
229 ".local/share/com.ubuntu.weather")
230 self.db_dir = os.path.join(self.app_dir, 'Databases')
231 self.db_file = "34e1e542f2f083ff18f537b07a380071.sqlite"
232 self.db_path = os.path.join(self.db_dir, self.db_file)
233
234 self.json_path = os.path.abspath(
235 os.path.join(os.path.dirname(__file__), '..', 'files'))
236
237
238class UbuntuWeatherAppTestCase(BaseTestCaseWithPatchedHome, DatabaseMixin):
145239
146 """Base test case that launches the ubuntu-weather-app."""240 """Base test case that launches the ubuntu-weather-app."""
147241
148 def setUp(self):242 def setUp(self):
149 super(UbuntuWeatherAppTestCase, self).setUp()243 super(UbuntuWeatherAppTestCase, self).setUp()
244
245 self.load_vars()
246 self.create_blank_db()
247
248 self.app = UbuntuWeatherApp(self.launcher())
249
250
251class UbuntuWeatherAppTestCaseWithData(BaseTestCaseWithPatchedHome,
252 DatabaseMixin):
253
254 """Base test case that launches the ubuntu-weather-app with data."""
255
256 def setUp(self):
257 super(UbuntuWeatherAppTestCaseWithData, self).setUp()
258
259 self.load_vars()
260 self.create_blank_db()
261
262 logger.debug("Adding fake data to new database")
263 self.add_locations_to_database()
264
150 self.app = UbuntuWeatherApp(self.launcher())265 self.app = UbuntuWeatherApp(self.launcher())
151266
=== added file 'tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_empty_state.py 2015-07-25 13:52:29 +0000
@@ -0,0 +1,35 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2# Copyright 2013, 2014, 2015 Canonical
3#
4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published
6# by the Free Software Foundation.
7
8"""Ubuntu Weather app autopilot tests."""
9
10from __future__ import absolute_import
11
12import logging
13from autopilot.matchers import Eventually
14from testtools.matchers import Equals
15
16
17from ubuntu_weather_app.tests import UbuntuWeatherAppTestCase
18
19logger = logging.getLogger(__name__)
20
21
22class TestEmptyState(UbuntuWeatherAppTestCase):
23
24 def setUp(self):
25 super(TestEmptyState, self).setUp()
26
27 def test_add_location_button(self):
28 """ tests that the add location page is shown after the Add Location
29 button is clicked """
30
31 self.app.click_add_location_button()
32
33 add_location_page = self.app.get_add_location_page()
34
35 self.assertThat(add_location_page.visible, Eventually(Equals(True)))
036
=== added file 'tests/autopilot/ubuntu_weather_app/tests/test_home_page.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_home_page.py 2015-07-25 13:52:29 +0000
@@ -0,0 +1,32 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2# Copyright 2013, 2014, 2015 Canonical
3#
4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published
6# by the Free Software Foundation.
7
8"""Ubuntu Weather app autopilot tests."""
9
10from __future__ import absolute_import
11
12import logging
13from autopilot.matchers import Eventually
14from testtools.matchers import Equals
15
16
17from ubuntu_weather_app.tests import UbuntuWeatherAppTestCaseWithData
18
19logger = logging.getLogger(__name__)
20
21
22class TestHomePage(UbuntuWeatherAppTestCaseWithData):
23
24 def setUp(self):
25 super(TestHomePage, self).setUp()
26
27 def test_locations_count_startup(self):
28 """ tests that the correct number of locations appear at startup """
29
30 home_page = self.app.get_home_page()
31
32 self.assertThat(home_page.get_location_count, Eventually(Equals(2)))
033
=== removed file 'tests/autopilot/ubuntu_weather_app/tests/test_weather.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_weather.py 2015-06-16 00:10:16 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_weather.py 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2# Copyright 2013, 2014, 2015 Canonical
3#
4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published
6# by the Free Software Foundation.
7
8"""Ubuntu Weather app autopilot tests."""
9
10from __future__ import absolute_import
11
12import logging
13from autopilot.matchers import Eventually
14from testtools.matchers import Equals
15
16
17from ubuntu_weather_app.tests import UbuntuWeatherAppTestCase
18
19logger = logging.getLogger(__name__)
20
21
22class TestMainWindow(UbuntuWeatherAppTestCase):
23
24 def setUp(self):
25 super(TestMainWindow, self).setUp()
26
27 def test_add_location_button(self):
28 """ tests that the add location page is shown after the Add Location
29 button is clicked """
30
31 self.app.click_add_location_button()
32
33 add_location_page = self.app.get_add_location_page()
34
35 self.assertThat(add_location_page.visible, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches

to all changes: