[libgweather/wip/hadess/fix-invalid-forecast: 2/5] tests: Set providers before network access is made



commit 6c9af6d5ab19d9d70ea75a69b756633799408f4b
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Aug 27 14:36:31 2019 +0300

    tests: Set providers before network access is made

 libgweather/test_weather.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgweather/test_weather.c b/libgweather/test_weather.c
index 4ad8a1d..68217d4 100644
--- a/libgweather/test_weather.c
+++ b/libgweather/test_weather.c
@@ -147,8 +147,10 @@ main (int argc, char **argv)
     g_message ("Found station %s for '%s'", gweather_location_get_name (loc), search_str);
 
     loop = g_main_loop_new (NULL, TRUE);
-    info = gweather_info_new (loc);
-    set_providers (info);
+    info = gweather_info_new (NULL);
+    if (!set_providers (info))
+        return 1;
+    gweather_info_set_location (info, loc);
     g_signal_connect (G_OBJECT (info), "updated",
                       G_CALLBACK (weather_updated), loop);
     gweather_info_update (info);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]