← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

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

 

Andrew Hayzen has proposed merging lp:~ahayzen/ubuntu-weather-app/reboot-ap-create-fake-env into lp:ubuntu-weather-app/reboot.

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

Requested reviews:
  Ubuntu Weather Developers (ubuntu-weather-dev)

For more details, see:
https://code.launchpad.net/~ahayzen/ubuntu-weather-app/reboot-ap-create-fake-env/+merge/265191

* 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?
* Has only been tested on desktop and not device yet
-- 
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~ahayzen/ubuntu-weather-app/reboot-ap-create-fake-env into lp:ubuntu-weather-app/reboot.
=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml	2015-06-18 01:42:03 +0000
+++ app/ui/HomePage.qml	2015-07-18 19:10:58 +0000
@@ -122,6 +122,7 @@
         */
         ListView {
             id: locationPages
+            objectName: "locationPages"
             anchors.fill: parent
             currentIndex: settings.current
             delegate: LocationPane {}

=== 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-18 19:10:58 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: ubuntu-weather-app\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-06-28 19:17-0500\n"
+"POT-Creation-Date: 2015-07-18 18:04+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -118,15 +118,15 @@
 msgid "Settings"
 msgstr ""
 
-#: ../app/ui/SettingsPage.qml:38 ../app/ui/settings/UnitsPage.qml:24
+#: ../app/ui/SettingsPage.qml:32 ../app/ui/settings/UnitsPage.qml:24
 msgid "Units"
 msgstr ""
 
-#: ../app/ui/SettingsPage.qml:43 ../app/ui/settings/DataProviderPage.qml:24
+#: ../app/ui/SettingsPage.qml:37 ../app/ui/settings/DataProviderPage.qml:24
 msgid "Data Provider"
 msgstr ""
 
-#: ../app/ui/SettingsPage.qml:48 ../app/ui/settings/RefreshIntervalPage.qml:24
+#: ../app/ui/SettingsPage.qml:42 ../app/ui/settings/RefreshIntervalPage.qml:24
 msgid "Refresh Interval"
 msgstr ""
 

=== 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-18 19:10:58 +0000
@@ -1,3 +1,5 @@
+add_subdirectory(databases)
+add_subdirectory(files)
 add_subdirectory(tests)
 
 # make the emulator files visible on qtcreator

=== 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-18 19:10:58 +0000
@@ -26,12 +26,19 @@
 
     def __init__(self, app_proxy):
         self.app = app_proxy
-        self.main_view = self.app.wait_select_single(MainView)
+
+        # Select by objectName due to it being MainView12 not MainView
+        self.main_view = self.app.wait_select_single(objectName="weather")
 
     def get_add_location_page(self):
         return self.main_view.wait_select_single(
             AddLocationPage, objectName="addLocationPage")
 
+    def get_home_page(self):
+        return self.main_view.wait_select_single(
+            HomePage, objectName="homePage"
+        )
+
     def click_add_location_button(self):
         add_location_button = self.main_view.wait_select_single(
             "Button", objectName="emptyStateButton")
@@ -44,12 +51,29 @@
         super(Page, self).__init__(*args)
 
 
+class PageWithBottomEdge(Page):
+    """Autopilot helper for PageWithBottomEdge."""
+    def __init__(self, *args):
+        super(PageWithBottomEdge, self).__init__(*args)
+
+
 class AddLocationPage(Page):
     """Autopilot helper for AddLocationPage."""
     def __init__(self, *args):
         super(AddLocationPage, self).__init__(*args)
 
 
+class HomePage(Page):
+    """Autopilot helper for HomePage."""
+    def __init__(self, *args):
+        super(HomePage, self).__init__(*args)
+
+    def get_location_count(self):
+        return self.wait_select_single(
+            "QQuickListView", objectName="locationPages"
+        ).count
+
+
 class MainView(MainView):
     """Autopilot custom proxy object for the MainView."""
     retry_delay = 0.2

=== 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-18 19:10:58 +0000
@@ -0,0 +1,6 @@
+[General]
+Description=Default Ubuntu weather app
+Driver=QSQLITE
+EstimatedSize=100000
+Name=com.ubuntu.weather
+Version=0.3

=== added file 'tests/autopilot/ubuntu_weather_app/databases/34e1e542f2f083ff18f537b07a380071.sqlite'
Binary 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-18 19:10:58 +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-18 19:10:58 +0000
@@ -0,0 +1,6 @@
+# make the emulator files visible on qtcreator
+file(GLOB PYTHON_EMULATOR_TEST_DATABASE_FILES
+     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+     *.ini *.sqlite)
+
+add_custom_target(ubuntu-weather-app_PYTHONEMULATORTestDatabaseFiles ALL SOURCES ${PYTHON_EMULATOR_TEST_DATABASE_FILES})

=== 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-18 19:10:58 +0000
@@ -0,0 +1,1509 @@
+{
+   "db":{
+      "id":4,
+      "updated":"2015-07-18T17:07:53.668Z"
+   },
+   "format":20150404,
+   "location":{
+      "objectName":"",
+      "adminName1":"England",
+      "adminName2":"Greater London",
+      "adminName3":"",
+      "areaLabel":"England, Greater London, United Kingdom",
+      "coord":{
+         "lat":"51.50853",
+         "lon":"-0.12574"
+      },
+      "country":"GB",
+      "countryName":"United Kingdom",
+      "name":"London",
+      "population":7556900,
+      "services":{
+         "geonames":2643743,
+         "openweathermap":2643743
+      },
+      "timezone":{
+         "dstOffset":1,
+         "gmtOffset":0,
+         "timeZoneId":"Europe/London"
+      }
+   },
+   "data":[
+      {
+         "condition":"Clouds",
+         "date":{
+            "date":18,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":18,
+                  "hours":18,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":45,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":71.006,
+                  "windSpeed":6.0704
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":21.67,
+                  "windSpeed":9.756
+               },
+               "pressure":1020.88,
+               "timestamp":1437242400,
+               "windDeg":233.508,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":18,
+                  "hours":21,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":49,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":65.84,
+                  "windSpeed":5.0624
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":18.8,
+                  "windSpeed":8.136
+               },
+               "pressure":1020.14,
+               "timestamp":1437253200,
+               "windDeg":211.004,
+               "windDir":"SW"
+            }
+         ],
+         "humidity":63,
+         "icon":"cloud_sun",
+         "imperial":{
+            "rain":0,
+            "snow":0,
+            "tempMax":73.724,
+            "tempMin":61.7,
+            "windSpeed":12.4544
+         },
+         "metric":{
+            "rain":0,
+            "snow":0,
+            "tempMax":23.18,
+            "tempMin":16.5,
+            "windSpeed":20.016
+         },
+         "pressure":1022.45,
+         "timestamp":1437220800,
+         "windDeg":247,
+         "windDir":"W",
+         "current":{
+            "condition":"Clouds",
+            "date":{
+               "date":18,
+               "hours":11,
+               "minutes":59,
+               "month":6,
+               "year":2015
+            },
+            "humidity":31,
+            "icon":"cloud",
+            "imperial":{
+               "rain":0,
+               "snow":0,
+               "temp":73.112,
+               "windSpeed":8.064000000000002
+            },
+            "metric":{
+               "rain":0,
+               "snow":0,
+               "temp":22.84,
+               "windSpeed":12.96
+            },
+            "pressure":1015,
+            "timestamp":1437237984,
+            "windDeg":230,
+            "windDir":"SW",
+            "service":"openweathermap",
+            "service_id":2643743
+         }
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":19,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":19,
+                  "hours":0,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":53,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":62.654,
+                  "windSpeed":4.412800000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":17.03,
+                  "windSpeed":7.092
+               },
+               "pressure":1019.63,
+               "timestamp":1437264000,
+               "windDeg":228.006,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":19,
+                  "hours":3,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":53,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":60.385999999999996,
+                  "windSpeed":3.1584000000000003
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":15.77,
+                  "windSpeed":5.076
+               },
+               "pressure":1016.87,
+               "timestamp":1437274800,
+               "windDeg":167.002,
+               "windDir":"S"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":19,
+                  "hours":6,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":92,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.0860236220472441,
+                  "snow":0,
+                  "temp":53.294,
+                  "windSpeed":4.7264
+               },
+               "metric":{
+                  "rain":2.185,
+                  "snow":0,
+                  "temp":11.83,
+                  "windSpeed":7.596
+               },
+               "pressure":1016.41,
+               "timestamp":1437285600,
+               "windDeg":247.002,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":19,
+                  "hours":9,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":78,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.055314960629921264,
+                  "snow":0,
+                  "temp":59.414,
+                  "windSpeed":5.734400000000001
+               },
+               "metric":{
+                  "rain":1.405,
+                  "snow":0,
+                  "temp":15.23,
+                  "windSpeed":9.216000000000001
+               },
+               "pressure":1014.95,
+               "timestamp":1437296400,
+               "windDeg":226.5,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":19,
+                  "hours":12,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":66,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":67.154,
+                  "windSpeed":10.259200000000002
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":19.53,
+                  "windSpeed":16.488
+               },
+               "pressure":1014.32,
+               "timestamp":1437307200,
+               "windDeg":247.005,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":19,
+                  "hours":15,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":59,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.00019685039370078743,
+                  "snow":0,
+                  "temp":68.45,
+                  "windSpeed":10.886400000000002
+               },
+               "metric":{
+                  "rain":0.005,
+                  "snow":0,
+                  "temp":20.25,
+                  "windSpeed":17.496000000000002
+               },
+               "pressure":1015.06,
+               "timestamp":1437318000,
+               "windDeg":263.001,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":19,
+                  "hours":18,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":51,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":67.676,
+                  "windSpeed":7.772800000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":19.82,
+                  "windSpeed":12.492
+               },
+               "pressure":1015.53,
+               "timestamp":1437328800,
+               "windDeg":269.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":21,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":59,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":60.494,
+                  "windSpeed":4.9952000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":15.83,
+                  "windSpeed":8.028
+               },
+               "pressure":1017.12,
+               "timestamp":1437339600,
+               "windDeg":255.003,
+               "windDir":"W"
+            }
+         ],
+         "humidity":81,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.19173228346456694,
+            "snow":0,
+            "tempMax":67.37,
+            "tempMin":48.74,
+            "windSpeed":19.4432
+         },
+         "metric":{
+            "rain":4.87,
+            "snow":0,
+            "tempMax":19.65,
+            "tempMin":9.3,
+            "windSpeed":31.248
+         },
+         "pressure":1014.57,
+         "timestamp":1437307200,
+         "windDeg":251,
+         "windDir":"W"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":20,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":20,
+                  "hours":0,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":78,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":52.43,
+                  "windSpeed":2.576
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":11.35,
+                  "windSpeed":4.14
+               },
+               "pressure":1017.21,
+               "timestamp":1437350400,
+               "windDeg":230.008,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":20,
+                  "hours":3,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":88,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":47.480000000000004,
+                  "windSpeed":2.3744000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":8.6,
+                  "windSpeed":3.8160000000000003
+               },
+               "pressure":1016.59,
+               "timestamp":1437361200,
+               "windDeg":166.004,
+               "windDir":"S"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":6,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":82,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.001377952755905512,
+                  "snow":0,
+                  "temp":53.69,
+                  "windSpeed":2.6208
+               },
+               "metric":{
+                  "rain":0.035,
+                  "snow":0,
+                  "temp":12.05,
+                  "windSpeed":4.212
+               },
+               "pressure":1016.62,
+               "timestamp":1437372000,
+               "windDeg":141.001,
+               "windDir":"SE"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":9,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":83,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.010629921259842521,
+                  "snow":0,
+                  "temp":59.36,
+                  "windSpeed":3.4048000000000003
+               },
+               "metric":{
+                  "rain":0.27,
+                  "snow":0,
+                  "temp":15.2,
+                  "windSpeed":5.472
+               },
+               "pressure":1016.18,
+               "timestamp":1437382800,
+               "windDeg":135,
+               "windDir":"SE"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":12,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":72,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.004330708661417323,
+                  "snow":0,
+                  "temp":66.956,
+                  "windSpeed":5.3984000000000005
+               },
+               "metric":{
+                  "rain":0.11,
+                  "snow":0,
+                  "temp":19.42,
+                  "windSpeed":8.676
+               },
+               "pressure":1015.33,
+               "timestamp":1437393600,
+               "windDeg":167.001,
+               "windDir":"S"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":15,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":68,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.003149606299212599,
+                  "snow":0,
+                  "temp":72.968,
+                  "windSpeed":9.7664
+               },
+               "metric":{
+                  "rain":0.08,
+                  "snow":0,
+                  "temp":22.76,
+                  "windSpeed":15.696000000000002
+               },
+               "pressure":1014.09,
+               "timestamp":1437404400,
+               "windDeg":220.002,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":18,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":83,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.03582677165354331,
+                  "snow":0,
+                  "temp":68.036,
+                  "windSpeed":12.118400000000001
+               },
+               "metric":{
+                  "rain":0.91,
+                  "snow":0,
+                  "temp":20.02,
+                  "windSpeed":19.476000000000003
+               },
+               "pressure":1013.88,
+               "timestamp":1437415200,
+               "windDeg":223.502,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":21,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":83,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.005118110236220473,
+                  "snow":0,
+                  "temp":66.38,
+                  "windSpeed":10.9536
+               },
+               "metric":{
+                  "rain":0.13,
+                  "snow":0,
+                  "temp":19.1,
+                  "windSpeed":17.604
+               },
+               "pressure":1013.72,
+               "timestamp":1437426000,
+               "windDeg":224.006,
+               "windDir":"SW"
+            }
+         ],
+         "humidity":81,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.030708661417322838,
+            "snow":0,
+            "tempMax":71.798,
+            "tempMin":52.519999999999996,
+            "windSpeed":10.2144
+         },
+         "metric":{
+            "rain":0.78,
+            "snow":0,
+            "tempMax":22.11,
+            "tempMin":11.4,
+            "windSpeed":16.416
+         },
+         "pressure":1016.62,
+         "timestamp":1437393600,
+         "windDeg":168,
+         "windDir":"S"
+      },
+      {
+         "condition":"Clouds",
+         "date":{
+            "date":21,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":21,
+                  "hours":0,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":87,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.01653543307086614,
+                  "snow":0,
+                  "temp":64.274,
+                  "windSpeed":9.8336
+               },
+               "metric":{
+                  "rain":0.42,
+                  "snow":0,
+                  "temp":17.93,
+                  "windSpeed":15.803999999999998
+               },
+               "pressure":1014.36,
+               "timestamp":1437436800,
+               "windDeg":237.503,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":21,
+                  "hours":3,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":82,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":59.684,
+                  "windSpeed":7.840000000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":15.38,
+                  "windSpeed":12.6
+               },
+               "pressure":1015,
+               "timestamp":1437447600,
+               "windDeg":249.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":21,
+                  "hours":6,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":81,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":58.838,
+                  "windSpeed":7.459200000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":14.91,
+                  "windSpeed":11.988000000000001
+               },
+               "pressure":1015.87,
+               "timestamp":1437458400,
+               "windDeg":245.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":21,
+                  "hours":9,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":72,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":64.544,
+                  "windSpeed":8.624
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":18.08,
+                  "windSpeed":13.860000000000001
+               },
+               "pressure":1016.56,
+               "timestamp":1437469200,
+               "windDeg":234.001,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":21,
+                  "hours":12,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":65,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":69.74600000000001,
+                  "windSpeed":10.4608
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.97,
+                  "windSpeed":16.812
+               },
+               "pressure":1016.62,
+               "timestamp":1437480000,
+               "windDeg":228.508,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":21,
+                  "hours":15,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":59,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":71.564,
+                  "windSpeed":11.6704
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":21.98,
+                  "windSpeed":18.756
+               },
+               "pressure":1016.46,
+               "timestamp":1437490800,
+               "windDeg":235,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":18,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":58,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":69.29599999999999,
+                  "windSpeed":10.796800000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.72,
+                  "windSpeed":17.352
+               },
+               "pressure":1016.78,
+               "timestamp":1437501600,
+               "windDeg":244.003,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":21,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":68,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":65.156,
+                  "windSpeed":8.534400000000002
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":18.42,
+                  "windSpeed":13.716000000000001
+               },
+               "pressure":1018.15,
+               "timestamp":1437512400,
+               "windDeg":249.501,
+               "windDir":"W"
+            }
+         ],
+         "humidity":73,
+         "icon":"cloud_sun",
+         "imperial":{
+            "rain":0,
+            "snow":0,
+            "tempMax":70.394,
+            "tempMin":57.938,
+            "windSpeed":18.412800000000004
+         },
+         "metric":{
+            "rain":0,
+            "snow":0,
+            "tempMax":21.33,
+            "tempMin":14.41,
+            "windSpeed":29.592000000000002
+         },
+         "pressure":1016.62,
+         "timestamp":1437480000,
+         "windDeg":233,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":22,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":0,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":71,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":62.654,
+                  "windSpeed":7.4144000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":17.03,
+                  "windSpeed":11.916
+               },
+               "pressure":1019.51,
+               "timestamp":1437523200,
+               "windDeg":264.503,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":3,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":78,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":57.956,
+                  "windSpeed":5.734400000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":14.42,
+                  "windSpeed":9.216000000000001
+               },
+               "pressure":1020.16,
+               "timestamp":1437534000,
+               "windDeg":265.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":22,
+                  "hours":6,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":79,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.00039370078740157485,
+                  "snow":0,
+                  "temp":58.964,
+                  "windSpeed":4.1664
+               },
+               "metric":{
+                  "rain":0.01,
+                  "snow":0,
+                  "temp":14.98,
+                  "windSpeed":6.696000000000001
+               },
+               "pressure":1020.7,
+               "timestamp":1437544800,
+               "windDeg":257.008,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":22,
+                  "hours":9,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":66,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.0007874015748031497,
+                  "snow":0,
+                  "temp":64.274,
+                  "windSpeed":3.9872000000000005
+               },
+               "metric":{
+                  "rain":0.02,
+                  "snow":0,
+                  "temp":17.93,
+                  "windSpeed":6.408
+               },
+               "pressure":1021.13,
+               "timestamp":1437555600,
+               "windDeg":247.5,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":12,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":61,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":68.55799999999999,
+                  "windSpeed":5.510400000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.31,
+                  "windSpeed":8.856
+               },
+               "pressure":1020.74,
+               "timestamp":1437566400,
+               "windDeg":227.501,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":15,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":56,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":69.44,
+                  "windSpeed":7.750400000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.8,
+                  "windSpeed":12.456
+               },
+               "pressure":1019.48,
+               "timestamp":1437577200,
+               "windDeg":236.001,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":18,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":56,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":67.19,
+                  "windSpeed":8.512
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":19.55,
+                  "windSpeed":13.68
+               },
+               "pressure":1019.42,
+               "timestamp":1437588000,
+               "windDeg":258.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":22,
+                  "hours":21,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":64,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.0007874015748031497,
+                  "snow":0,
+                  "temp":63.35600000000001,
+                  "windSpeed":5.1968000000000005
+               },
+               "metric":{
+                  "rain":0.02,
+                  "snow":0,
+                  "temp":17.42,
+                  "windSpeed":8.352
+               },
+               "pressure":1020.07,
+               "timestamp":1437598800,
+               "windDeg":261.502,
+               "windDir":"W"
+            }
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.07007874015748032,
+            "snow":0,
+            "tempMax":70.80799999999999,
+            "tempMin":58.135999999999996,
+            "windSpeed":8.736
+         },
+         "metric":{
+            "rain":1.78,
+            "snow":0,
+            "tempMax":21.56,
+            "tempMin":14.52,
+            "windSpeed":14.04
+         },
+         "pressure":1023.19,
+         "timestamp":1437566400,
+         "windDeg":219,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Clear",
+         "date":{
+            "date":23,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":23,
+                  "hours":0,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":74,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.003149606299212599,
+                  "snow":0,
+                  "temp":60.908,
+                  "windSpeed":3.2704000000000004
+               },
+               "metric":{
+                  "rain":0.08,
+                  "snow":0,
+                  "temp":16.06,
+                  "windSpeed":5.256
+               },
+               "pressure":1020.03,
+               "timestamp":1437609600,
+               "windDeg":253.504,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":23,
+                  "hours":3,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":83,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.005905511811023622,
+                  "snow":0,
+                  "temp":59.054,
+                  "windSpeed":3.4048000000000003
+               },
+               "metric":{
+                  "rain":0.15,
+                  "snow":0,
+                  "temp":15.03,
+                  "windSpeed":5.472
+               },
+               "pressure":1019.47,
+               "timestamp":1437620400,
+               "windDeg":251.501,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":23,
+                  "hours":6,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":88,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.006692913385826772,
+                  "snow":0,
+                  "temp":59.054,
+                  "windSpeed":3.4048000000000003
+               },
+               "metric":{
+                  "rain":0.17,
+                  "snow":0,
+                  "temp":15.03,
+                  "windSpeed":5.472
+               },
+               "pressure":1019.07,
+               "timestamp":1437631200,
+               "windDeg":165.001,
+               "windDir":"S"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":23,
+                  "hours":9,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":77,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.0024606299212598425,
+                  "snow":0,
+                  "temp":63.212,
+                  "windSpeed":4.972800000000001
+               },
+               "metric":{
+                  "rain":0.0625,
+                  "snow":0,
+                  "temp":17.34,
+                  "windSpeed":7.992000000000001
+               },
+               "pressure":1018.4,
+               "timestamp":1437642000,
+               "windDeg":199.002,
+               "windDir":"S"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":23,
+                  "hours":12,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":64,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":68.27,
+                  "windSpeed":6.7424
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.15,
+                  "windSpeed":10.836
+               },
+               "pressure":1017.1,
+               "timestamp":1437652800,
+               "windDeg":224.501,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":23,
+                  "hours":15,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":62,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.0004921259842519686,
+                  "snow":0,
+                  "temp":67.55000000000001,
+                  "windSpeed":8.4224
+               },
+               "metric":{
+                  "rain":0.0125,
+                  "snow":0,
+                  "temp":19.75,
+                  "windSpeed":13.536
+               },
+               "pressure":1016.06,
+               "timestamp":1437663600,
+               "windDeg":231.501,
+               "windDir":"SW"
+            }
+         ],
+         "humidity":0,
+         "icon":"sun",
+         "imperial":{
+            "rain":0,
+            "snow":0,
+            "tempMax":73.328,
+            "tempMin":58.064,
+            "windSpeed":8.601600000000001
+         },
+         "metric":{
+            "rain":0,
+            "snow":0,
+            "tempMax":22.96,
+            "tempMin":14.48,
+            "windSpeed":13.824
+         },
+         "pressure":1023.52,
+         "timestamp":1437652800,
+         "windDeg":239,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":24,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.01968503937007874,
+            "snow":0,
+            "tempMax":79.07,
+            "tempMin":63.068000000000005,
+            "windSpeed":12.1632
+         },
+         "metric":{
+            "rain":0.5,
+            "snow":0,
+            "tempMax":26.15,
+            "tempMin":17.26,
+            "windSpeed":19.548
+         },
+         "pressure":1017.03,
+         "timestamp":1437739200,
+         "windDeg":87,
+         "windDir":"E"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":25,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.010629921259842521,
+            "snow":0,
+            "tempMax":74.084,
+            "tempMin":60.025999999999996,
+            "windSpeed":13.820800000000002
+         },
+         "metric":{
+            "rain":0.27,
+            "snow":0,
+            "tempMax":23.38,
+            "tempMin":15.57,
+            "windSpeed":22.212
+         },
+         "pressure":1015.03,
+         "timestamp":1437825600,
+         "windDeg":228,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Clear",
+         "date":{
+            "date":26,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"sun",
+         "imperial":{
+            "rain":0,
+            "snow":0,
+            "tempMax":70.16,
+            "tempMin":58.028000000000006,
+            "windSpeed":17.3824
+         },
+         "metric":{
+            "rain":0,
+            "snow":0,
+            "tempMax":21.2,
+            "tempMin":14.46,
+            "windSpeed":27.936
+         },
+         "pressure":1016.83,
+         "timestamp":1437912000,
+         "windDeg":226,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":27,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.031102362204724412,
+            "snow":0,
+            "tempMax":69.53,
+            "tempMin":56.426,
+            "windSpeed":12.4544
+         },
+         "metric":{
+            "rain":0.79,
+            "snow":0,
+            "tempMax":20.85,
+            "tempMin":13.57,
+            "windSpeed":20.016
+         },
+         "pressure":1017.26,
+         "timestamp":1437998400,
+         "windDeg":245,
+         "windDir":"W"
+      }
+   ],
+   "save":true,
+   "updated":1437239273904
+}

=== 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-18 19:10:58 +0000
@@ -0,0 +1,1509 @@
+{
+   "db":{
+      "id":3,
+      "updated":"2015-07-18T17:06:03.228Z"
+   },
+   "format":20150404,
+   "location":{
+      "objectName":"",
+      "adminName1":"Washington, D.C.",
+      "adminName2":"US.DC.001",
+      "adminName3":"",
+      "areaLabel":"Washington, D.C., United States",
+      "coord":{
+         "lat":"38.89511",
+         "lon":"-77.03637"
+      },
+      "country":"US",
+      "countryName":"United States",
+      "name":"Washington",
+      "population":601723,
+      "services":{
+         "geonames":4140963,
+         "openweathermap":4140963
+      },
+      "timezone":{
+         "dstOffset":-4,
+         "gmtOffset":-5,
+         "timeZoneId":"America/New_York"
+      }
+   },
+   "data":[
+      {
+         "condition":"Rain",
+         "date":{
+            "date":18,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":18,
+                  "hours":13,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":72,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":85.136,
+                  "windSpeed":4.9504
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":29.52,
+                  "windSpeed":7.956
+               },
+               "pressure":1020.23,
+               "timestamp":1437242400,
+               "windDeg":202.008,
+               "windDir":"S"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":18,
+                  "hours":16,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":64,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":86.21600000000001,
+                  "windSpeed":6.7424
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":30.12,
+                  "windSpeed":10.836
+               },
+               "pressure":1018.84,
+               "timestamp":1437253200,
+               "windDeg":213.504,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":18,
+                  "hours":19,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":78,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.17874015748031497,
+                  "snow":0,
+                  "temp":79.7,
+                  "windSpeed":4.1888000000000005
+               },
+               "metric":{
+                  "rain":4.54,
+                  "snow":0,
+                  "temp":26.5,
+                  "windSpeed":6.732
+               },
+               "pressure":1019.47,
+               "timestamp":1437264000,
+               "windDeg":291.506,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":18,
+                  "hours":22,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":88,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.017913385826771655,
+                  "snow":0,
+                  "temp":75.938,
+                  "windSpeed":2.9344000000000006
+               },
+               "metric":{
+                  "rain":0.455,
+                  "snow":0,
+                  "temp":24.41,
+                  "windSpeed":4.716
+               },
+               "pressure":1019.87,
+               "timestamp":1437274800,
+               "windDeg":270.502,
+               "windDir":"W"
+            }
+         ],
+         "humidity":72,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.1968503937007874,
+            "snow":0,
+            "tempMax":86.19800000000001,
+            "tempMin":74.35400000000001,
+            "windSpeed":4.9504
+         },
+         "metric":{
+            "rain":5,
+            "snow":0,
+            "tempMax":30.11,
+            "tempMin":23.53,
+            "windSpeed":7.956
+         },
+         "pressure":1020.23,
+         "timestamp":1437238800,
+         "windDeg":202,
+         "windDir":"S",
+         "current":{
+            "condition":"Rain",
+            "date":{
+               "date":18,
+               "hours":11,
+               "minutes":59,
+               "month":6,
+               "year":2015
+            },
+            "humidity":88,
+            "icon":"rain",
+            "imperial":{
+               "rain":0,
+               "snow":0,
+               "temp":78.314,
+               "windSpeed":5.824000000000001
+            },
+            "metric":{
+               "rain":0,
+               "snow":0,
+               "temp":25.73,
+               "windSpeed":9.360000000000001
+            },
+            "pressure":1016,
+            "timestamp":1437236981,
+            "windDeg":270,
+            "windDir":"W",
+            "service":"openweathermap",
+            "service_id":4140963
+         }
+      },
+      {
+         "condition":"Clear",
+         "date":{
+            "date":19,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":1,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":95,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":74.35400000000001,
+                  "windSpeed":2.7104000000000004
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":23.53,
+                  "windSpeed":4.356
+               },
+               "pressure":1019.41,
+               "timestamp":1437285600,
+               "windDeg":254.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":4,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":92,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":73.094,
+                  "windSpeed":2.9344000000000006
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":22.83,
+                  "windSpeed":4.716
+               },
+               "pressure":1019.25,
+               "timestamp":1437296400,
+               "windDeg":286.5,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":7,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":84,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":80.564,
+                  "windSpeed":5.219200000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":26.98,
+                  "windSpeed":8.388
+               },
+               "pressure":1019.67,
+               "timestamp":1437307200,
+               "windDeg":311.005,
+               "windDir":"NW"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":10,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":82,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":87.25999999999999,
+                  "windSpeed":3.9424000000000006
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":30.7,
+                  "windSpeed":6.336
+               },
+               "pressure":1019.85,
+               "timestamp":1437318000,
+               "windDeg":332.001,
+               "windDir":"N"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":13,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":74,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":90.536,
+                  "windSpeed":3.7408
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":32.52,
+                  "windSpeed":6.012
+               },
+               "pressure":1018.93,
+               "timestamp":1437328800,
+               "windDeg":307.502,
+               "windDir":"NW"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":16,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":67,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":91.904,
+                  "windSpeed":3.7632000000000003
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":33.28,
+                  "windSpeed":6.048
+               },
+               "pressure":1016.96,
+               "timestamp":1437339600,
+               "windDeg":268.003,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":19,
+                  "hours":19,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":68,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":88.78999999999999,
+                  "windSpeed":4.144000000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":31.55,
+                  "windSpeed":6.66
+               },
+               "pressure":1016.48,
+               "timestamp":1437350400,
+               "windDeg":242.008,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":19,
+                  "hours":22,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":72,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":83.48,
+                  "windSpeed":6.2944
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":28.6,
+                  "windSpeed":10.116
+               },
+               "pressure":1016.51,
+               "timestamp":1437361200,
+               "windDeg":218.504,
+               "windDir":"SW"
+            }
+         ],
+         "humidity":74,
+         "icon":"sun",
+         "imperial":{
+            "rain":0,
+            "snow":0,
+            "tempMax":91.904,
+            "tempMin":80.564,
+            "windSpeed":3.7408
+         },
+         "metric":{
+            "rain":0,
+            "snow":0,
+            "tempMax":33.28,
+            "tempMin":26.98,
+            "windSpeed":6.012
+         },
+         "pressure":1018.93,
+         "timestamp":1437325200,
+         "windDeg":308,
+         "windDir":"NW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":20,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":20,
+                  "hours":1,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":77,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":81.5,
+                  "windSpeed":5.7568
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":27.5,
+                  "windSpeed":9.251999999999999
+               },
+               "pressure":1015.89,
+               "timestamp":1437372000,
+               "windDeg":245.501,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":20,
+                  "hours":4,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":76,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":80.06,
+                  "windSpeed":4.748800000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":26.7,
+                  "windSpeed":7.632000000000001
+               },
+               "pressure":1014.8,
+               "timestamp":1437382800,
+               "windDeg":257,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":20,
+                  "hours":7,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":100,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.17775590551181103,
+                  "snow":0,
+                  "temp":72.356,
+                  "windSpeed":5.958400000000001
+               },
+               "metric":{
+                  "rain":4.515,
+                  "snow":0,
+                  "temp":22.42,
+                  "windSpeed":9.576
+               },
+               "pressure":1016.79,
+               "timestamp":1437393600,
+               "windDeg":296.501,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":20,
+                  "hours":10,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":97,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":79.268,
+                  "windSpeed":5.958400000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":26.26,
+                  "windSpeed":9.576
+               },
+               "pressure":1016.6,
+               "timestamp":1437404400,
+               "windDeg":277.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":20,
+                  "hours":13,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":79,
+               "icon":"sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":87.656,
+                  "windSpeed":6.7424
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":30.92,
+                  "windSpeed":10.836
+               },
+               "pressure":1014.93,
+               "timestamp":1437415200,
+               "windDeg":294.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":20,
+                  "hours":16,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":67,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":88.97,
+                  "windSpeed":8.668800000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":31.65,
+                  "windSpeed":13.932
+               },
+               "pressure":1013.88,
+               "timestamp":1437426000,
+               "windDeg":298.006,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":20,
+                  "hours":19,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":65,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":83.98400000000001,
+                  "windSpeed":5.510400000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":28.88,
+                  "windSpeed":8.856
+               },
+               "pressure":1014.36,
+               "timestamp":1437436800,
+               "windDeg":322.503,
+               "windDir":"NW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":20,
+                  "hours":22,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":66,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":76.244,
+                  "windSpeed":6.384000000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":24.58,
+                  "windSpeed":10.26
+               },
+               "pressure":1015.65,
+               "timestamp":1437447600,
+               "windDeg":341.502,
+               "windDir":"N"
+            }
+         ],
+         "humidity":79,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.1779527559055118,
+            "snow":0,
+            "tempMax":88.97,
+            "tempMin":72.24799999999999,
+            "windSpeed":6.7424
+         },
+         "metric":{
+            "rain":4.52,
+            "snow":0,
+            "tempMax":31.65,
+            "tempMin":22.36,
+            "windSpeed":10.836
+         },
+         "pressure":1014.93,
+         "timestamp":1437411600,
+         "windDeg":295,
+         "windDir":"W"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":21,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":1,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":70,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":72.24799999999999,
+                  "windSpeed":6.339200000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":22.36,
+                  "windSpeed":10.188
+               },
+               "pressure":1015.63,
+               "timestamp":1437458400,
+               "windDeg":320.002,
+               "windDir":"NW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":4,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":80,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":69.94399999999999,
+                  "windSpeed":3.0240000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":21.08,
+                  "windSpeed":4.86
+               },
+               "pressure":1015.59,
+               "timestamp":1437469200,
+               "windDeg":300.501,
+               "windDir":"NW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":7,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":80,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":76.04599999999999,
+                  "windSpeed":3.7408
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":24.47,
+                  "windSpeed":6.012
+               },
+               "pressure":1015.89,
+               "timestamp":1437480000,
+               "windDeg":299.008,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":10,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":76,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":83.26400000000001,
+                  "windSpeed":3.9424000000000006
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":28.48,
+                  "windSpeed":6.336
+               },
+               "pressure":1015.73,
+               "timestamp":1437490800,
+               "windDeg":295.5,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":13,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":70,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":86.036,
+                  "windSpeed":3.6288000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":30.02,
+                  "windSpeed":5.832000000000001
+               },
+               "pressure":1014.18,
+               "timestamp":1437501600,
+               "windDeg":264.503,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":21,
+                  "hours":16,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":62,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":86.30600000000001,
+                  "windSpeed":5.3984000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":30.17,
+                  "windSpeed":8.676
+               },
+               "pressure":1013.37,
+               "timestamp":1437512400,
+               "windDeg":243.501,
+               "windDir":"W"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":21,
+                  "hours":19,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":93,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.06850393700787402,
+                  "snow":0,
+                  "temp":72.73400000000001,
+                  "windSpeed":6.1824
+               },
+               "metric":{
+                  "rain":1.74,
+                  "snow":0,
+                  "temp":22.63,
+                  "windSpeed":9.936
+               },
+               "pressure":1014.16,
+               "timestamp":1437523200,
+               "windDeg":236.003,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":21,
+                  "hours":22,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":93,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":70.646,
+                  "windSpeed":3.9424000000000006
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":21.47,
+                  "windSpeed":6.336
+               },
+               "pressure":1014.32,
+               "timestamp":1437534000,
+               "windDeg":249.502,
+               "windDir":"W"
+            }
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0,
+            "snow":0,
+            "tempMax":83.53399999999999,
+            "tempMin":73.45400000000001,
+            "windSpeed":6.496
+         },
+         "metric":{
+            "rain":0,
+            "snow":0,
+            "tempMax":28.63,
+            "tempMin":23.03,
+            "windSpeed":10.44
+         },
+         "pressure":1012.07,
+         "timestamp":1437498000,
+         "windDeg":317,
+         "windDir":"NW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":22,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":22,
+                  "hours":1,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":94,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":69.044,
+                  "windSpeed":3.7184000000000004
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.58,
+                  "windSpeed":5.976
+               },
+               "pressure":1013.97,
+               "timestamp":1437544800,
+               "windDeg":253.008,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":22,
+                  "hours":4,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":94,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":68.054,
+                  "windSpeed":3.2032000000000003
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":20.03,
+                  "windSpeed":5.148
+               },
+               "pressure":1013.68,
+               "timestamp":1437555600,
+               "windDeg":237,
+               "windDir":"SW"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":7,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":88,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":72.518,
+                  "windSpeed":4.1664
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":22.51,
+                  "windSpeed":6.696000000000001
+               },
+               "pressure":1014.42,
+               "timestamp":1437566400,
+               "windDeg":269.501,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":10,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":83,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":81.05000000000001,
+                  "windSpeed":3.9424000000000006
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":27.25,
+                  "windSpeed":6.336
+               },
+               "pressure":1015.19,
+               "timestamp":1437577200,
+               "windDeg":7.50089,
+               "windDir":"N"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":13,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":76,
+               "icon":"cloud_sun",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":84.28999999999999,
+                  "windSpeed":4.032000000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":29.05,
+                  "windSpeed":6.48
+               },
+               "pressure":1014.88,
+               "timestamp":1437588000,
+               "windDeg":24.0016,
+               "windDir":"N"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":16,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":68,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":84.146,
+                  "windSpeed":3.8528000000000002
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":28.97,
+                  "windSpeed":6.192
+               },
+               "pressure":1014.72,
+               "timestamp":1437598800,
+               "windDeg":331.502,
+               "windDir":"N"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":22,
+                  "hours":19,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":69,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":82.05799999999999,
+                  "windSpeed":3.8304000000000005
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":27.81,
+                  "windSpeed":6.156
+               },
+               "pressure":1015.49,
+               "timestamp":1437609600,
+               "windDeg":310.004,
+               "windDir":"NW"
+            },
+            {
+               "condition":"Rain",
+               "date":{
+                  "date":22,
+                  "hours":22,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":72,
+               "icon":"rain",
+               "imperial":{
+                  "rain":0.0011811023622047244,
+                  "snow":0,
+                  "temp":78.044,
+                  "windSpeed":5.1968000000000005
+               },
+               "metric":{
+                  "rain":0.03,
+                  "snow":0,
+                  "temp":25.58,
+                  "windSpeed":8.352
+               },
+               "pressure":1017.2,
+               "timestamp":1437620400,
+               "windDeg":339.001,
+               "windDir":"N"
+            }
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.042913385826771656,
+            "snow":0,
+            "tempMax":83.31800000000001,
+            "tempMin":73.274,
+            "windSpeed":2.0608000000000004
+         },
+         "metric":{
+            "rain":1.09,
+            "snow":0,
+            "tempMax":28.51,
+            "tempMin":22.93,
+            "windSpeed":3.3120000000000003
+         },
+         "pressure":1013.42,
+         "timestamp":1437584400,
+         "windDeg":286,
+         "windDir":"W"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":23,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":23,
+                  "hours":1,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":83,
+               "icon":"cloud_moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":73.904,
+                  "windSpeed":3.7408
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":23.28,
+                  "windSpeed":6.012
+               },
+               "pressure":1017.28,
+               "timestamp":1437631200,
+               "windDeg":342.501,
+               "windDir":"N"
+            },
+            {
+               "condition":"Clear",
+               "date":{
+                  "date":23,
+                  "hours":4,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":94,
+               "icon":"moon",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":70.142,
+                  "windSpeed":2.7328
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":21.19,
+                  "windSpeed":4.392
+               },
+               "pressure":1017.75,
+               "timestamp":1437642000,
+               "windDeg":299.502,
+               "windDir":"W"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":23,
+                  "hours":7,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":80,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":72.59,
+                  "windSpeed":7.638400000000001
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":22.55,
+                  "windSpeed":12.276000000000002
+               },
+               "pressure":1019.29,
+               "timestamp":1437652800,
+               "windDeg":348.501,
+               "windDir":"N"
+            },
+            {
+               "condition":"Clouds",
+               "date":{
+                  "date":23,
+                  "hours":10,
+                  "minutes":0,
+                  "month":6,
+                  "year":2015
+               },
+               "humidity":74,
+               "icon":"cloud",
+               "imperial":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":77.36,
+                  "windSpeed":6.1824
+               },
+               "metric":{
+                  "rain":0,
+                  "snow":0,
+                  "temp":25.2,
+                  "windSpeed":9.936
+               },
+               "pressure":1020.11,
+               "timestamp":1437663600,
+               "windDeg":19.0006,
+               "windDir":"N"
+            }
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.020866141732283468,
+            "snow":0,
+            "tempMax":84.758,
+            "tempMin":73.328,
+            "windSpeed":7.548800000000001
+         },
+         "metric":{
+            "rain":0.53,
+            "snow":0,
+            "tempMax":29.31,
+            "tempMin":22.96,
+            "windSpeed":12.132000000000001
+         },
+         "pressure":1016.1,
+         "timestamp":1437670800,
+         "windDeg":327,
+         "windDir":"NW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":24,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.013779527559055118,
+            "snow":0,
+            "tempMax":87.17,
+            "tempMin":74.12,
+            "windSpeed":5.6896
+         },
+         "metric":{
+            "rain":0.35,
+            "snow":0,
+            "tempMax":30.65,
+            "tempMin":23.4,
+            "windSpeed":9.144
+         },
+         "pressure":1017.79,
+         "timestamp":1437757200,
+         "windDeg":234,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":25,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.13385826771653545,
+            "snow":0,
+            "tempMax":94.334,
+            "tempMin":80.114,
+            "windSpeed":8.5792
+         },
+         "metric":{
+            "rain":3.4,
+            "snow":0,
+            "tempMax":34.63,
+            "tempMin":26.73,
+            "windSpeed":13.788
+         },
+         "pressure":1012.93,
+         "timestamp":1437843600,
+         "windDeg":233,
+         "windDir":"SW"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":26,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.01141732283464567,
+            "snow":0,
+            "tempMax":93.02,
+            "tempMin":77.756,
+            "windSpeed":7.750400000000001
+         },
+         "metric":{
+            "rain":0.29,
+            "snow":0,
+            "tempMax":33.9,
+            "tempMin":25.42,
+            "windSpeed":12.456
+         },
+         "pressure":1011.84,
+         "timestamp":1437930000,
+         "windDeg":271,
+         "windDir":"W"
+      },
+      {
+         "condition":"Rain",
+         "date":{
+            "date":27,
+            "hours":11,
+            "minutes":59,
+            "month":6,
+            "year":2015
+         },
+         "hourly":[
+
+         ],
+         "humidity":0,
+         "icon":"rain",
+         "imperial":{
+            "rain":0.25826771653543307,
+            "snow":0,
+            "tempMax":93.506,
+            "tempMin":77,
+            "windSpeed":5.443200000000001
+         },
+         "metric":{
+            "rain":6.56,
+            "snow":0,
+            "tempMax":34.17,
+            "tempMin":25,
+            "windSpeed":8.748000000000001
+         },
+         "pressure":1011.02,
+         "timestamp":1438016400,
+         "windDeg":182,
+         "windDir":"S"
+      }
+   ],
+   "save":true,
+   "updated":1437239163515
+}

=== 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-18 19:10:58 +0000
@@ -0,0 +1,6 @@
+# make the emulator files visible on qtcreator
+file(GLOB PYTHON_EMULATOR_TEST_RESOURCE_FILES
+     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+     *.json)
+
+add_custom_target(ubuntu-weather-app_PYTHONEMULATORTestResourceFiles ALL SOURCES ${PYTHON_EMULATOR_TEST_RESOURCE_FILES})

=== 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-18 19:10:58 +0000
@@ -19,12 +19,17 @@
 import os
 import os.path
 import shutil
+import sqlite3
+import time
 import logging
 
 import fixtures
 from ubuntu_weather_app import UbuntuWeatherApp
+import ubuntu_weather_app
 
 from autopilot import logging as autopilot_logging
+from autopilot.matchers import Eventually
+from testtools.matchers import Equals
 from autopilot.testcase import AutopilotTestCase
 
 import ubuntuuitoolkit
@@ -138,13 +143,127 @@
                                                          newvalue=temp_dir))
 
             logger.debug("Patched home to fake home directory %s" % temp_dir)
+
         return temp_dir
 
 
-class UbuntuWeatherAppTestCase(BaseTestCaseWithPatchedHome):
+class DatabaseMixin(object):
+
+    """
+    Helper functions for dealing with sqlite databases
+    """
+
+    def _execute_sql(self, statement):
+        conn = sqlite3.connect(self.db_path)
+        cursor = conn.cursor()
+        logger.debug("Executing sql")
+        logger.debug(statement)
+        cursor.execute(statement)
+        conn.commit()
+        conn.close()
+
+    def add_locations_to_database(self, limit=None):
+        locations = self.get_locations_data()
+        conn = sqlite3.connect(self.db_path)
+        cursor = conn.cursor()
+        logger.debug("Adding locations to database")
+
+        for loc_data in locations:
+            db_exec = "INSERT INTO Locations(date, data) VALUES('{}', '{}')"
+            cursor.execute(db_exec.format(
+                int(time.time() * 1000), loc_data)
+            )
+            conn.commit()
+
+        conn.close()
+
+    def clean_db(self):
+        logger.debug("Removing existing database at %s" % self.db_dir)
+
+        try:
+            shutil.rmtree(self.db_dir)
+        except OSError:
+            logger.debug("Could not remove existing database")
+            pass
+
+    def create_blank_db(self):
+        self.clean_db()
+
+        # create blank db
+        database_tmpl_dir = os.path.join(
+            os.path.dirname(ubuntu_weather_app.__file__),
+            'databases')
+        logger.debug("Creating blank db on filesystem %s" % self.db_dir)
+
+        if not os.path.exists(self.app_dir):
+            os.makedirs(self.app_dir)
+
+        shutil.copytree(database_tmpl_dir, self.db_dir)
+
+        self.assertThat(
+            lambda: os.path.exists(self.db_path),
+            Eventually(Equals(True))
+        )
+
+        # this needs to stay in sync with Storage.qml enties
+        logger.debug("Creating locations and settings tables")
+        self._execute_sql("CREATE TABLE IF NOT EXISTS Locations(id INTEGER "
+                          "PRIMARY KEY AUTOINCREMENT, data TEXT, date TEXT)")
+
+        self._execute_sql("CREATE TABLE IF NOT EXISTS settings(key TEXT "
+                          "UNIQUE, value TEXT)")
+
+    def get_locations_data(self):
+        result = []
+        json_files = [self.json_path + '/1.json', self.json_path + '/2.json']
+
+        for path in json_files:
+            with open(path) as fh:
+                json_str = fh.read()
+                result.append(json_str.strip())
+                fh.close()
+
+        return result
+
+    def load_vars(self):
+        self.app_dir = os.path.join(
+            os.environ.get('HOME'),
+            ".local/share/com.ubuntu.weather"
+        )
+        self.db_dir = os.path.join(self.app_dir, 'Databases')
+        self.db_file = "34e1e542f2f083ff18f537b07a380071.sqlite"
+        self.db_path = os.path.join(self.db_dir, self.db_file)
+
+        self.json_path = os.path.abspath(
+            os.path.join(os.path.dirname(__file__), '..', 'files')
+        )
+
+
+class UbuntuWeatherAppTestCase(BaseTestCaseWithPatchedHome, DatabaseMixin):
 
     """Base test case that launches the ubuntu-weather-app."""
 
     def setUp(self):
         super(UbuntuWeatherAppTestCase, self).setUp()
+
+        self.load_vars()
+        self.create_blank_db()
+
+        self.app = UbuntuWeatherApp(self.launcher())
+
+
+class UbuntuWeatherAppTestCaseWithData(BaseTestCaseWithPatchedHome,
+                                       DatabaseMixin):
+
+    """Base test case that launches the ubuntu-weather-app with data."""
+
+    def setUp(self):
+        super(UbuntuWeatherAppTestCaseWithData, self).setUp()
+
+        self.load_vars()
+        self.create_blank_db()
+
+        logger.debug("Adding fake data to new database")
+        self.add_locations_to_database()
+
         self.app = UbuntuWeatherApp(self.launcher())

=== 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-18 19:10:58 +0000
@@ -0,0 +1,35 @@
+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
+# Copyright 2013, 2014, 2015 Canonical
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 3, as published
+# by the Free Software Foundation.
+
+"""Ubuntu Weather app autopilot tests."""
+
+from __future__ import absolute_import
+
+import logging
+from autopilot.matchers import Eventually
+from testtools.matchers import Equals
+
+
+from ubuntu_weather_app.tests import UbuntuWeatherAppTestCase
+
+logger = logging.getLogger(__name__)
+
+
+class TestEmptyState(UbuntuWeatherAppTestCase):
+
+    def setUp(self):
+        super(TestEmptyState, self).setUp()
+
+    def test_add_location_button(self):
+        """ tests that the add location page is shown after the Add Location
+            button is clicked """
+
+        self.app.click_add_location_button()
+
+        add_location_page = self.app.get_add_location_page()
+
+        self.assertThat(add_location_page.visible, Eventually(Equals(True)))

=== 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-18 19:10:58 +0000
@@ -0,0 +1,32 @@
+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
+# Copyright 2013, 2014, 2015 Canonical
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 3, as published
+# by the Free Software Foundation.
+
+"""Ubuntu Weather app autopilot tests."""
+
+from __future__ import absolute_import
+
+import logging
+from autopilot.matchers import Eventually
+from testtools.matchers import Equals
+
+
+from ubuntu_weather_app.tests import UbuntuWeatherAppTestCaseWithData
+
+logger = logging.getLogger(__name__)
+
+
+class TestHomePage(UbuntuWeatherAppTestCaseWithData):
+
+    def setUp(self):
+        super(TestHomePage, self).setUp()
+
+    def test_locations_count_startup(self):
+        """ tests that the correct number of locations appear at startup """
+
+        home_page = self.app.get_home_page()
+
+        self.assertThat(home_page.get_location_count, Eventually(Equals(2)))

=== 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 @@
-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
-# Copyright 2013, 2014, 2015 Canonical
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 3, as published
-# by the Free Software Foundation.
-
-"""Ubuntu Weather app autopilot tests."""
-
-from __future__ import absolute_import
-
-import logging
-from autopilot.matchers import Eventually
-from testtools.matchers import Equals
-
-
-from ubuntu_weather_app.tests import UbuntuWeatherAppTestCase
-
-logger = logging.getLogger(__name__)
-
-
-class TestMainWindow(UbuntuWeatherAppTestCase):
-
-    def setUp(self):
-        super(TestMainWindow, self).setUp()
-
-    def test_add_location_button(self):
-        """ tests that the add location page is shown after the Add Location
-            button is clicked """
-
-        self.app.click_add_location_button()
-
-        add_location_page = self.app.get_add_location_page()
-
-        self.assertThat(add_location_page.visible, Eventually(Equals(True)))


Follow ups