diff options
Diffstat (limited to 'tests/python/test_net.py')
-rw-r--r-- | tests/python/test_net.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/python/test_net.py b/tests/python/test_net.py new file mode 100644 index 0000000..acffff6 --- /dev/null +++ b/tests/python/test_net.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 + +import gi +gi.require_version('GrlNet', '0.3') +from gi.repository import GrlNet +from gi.repository import GLib + +def check_result(wc, res, loop): + loop.quit() + [success, contents] = wc.request_finish(res) + assert(success == True) + +def _init(): + wc = GrlNet.Wc.new() + + loop = GLib.MainLoop() + wc.request_async('https://www.gnome.org/', None, check_result, loop) + loop.run() + +_init() |