diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-08-26 14:42:57 +0200 |
---|---|---|
committer | Victor Toso <victortoso@gnome.org> | 2021-10-04 07:56:37 +0000 |
commit | 68c5247157e790b574be47d0353710cf853b8828 (patch) | |
tree | 30747da9f272990084327f1a74c4be29c5cb7b5b | |
parent | a52459f1321cf621338125d1e928d052a3fd1833 (diff) | |
download | grilo-68c5247157e790b574be47d0353710cf853b8828.tar.gz |
tests: Add Python GrlNet test
This will crash without the introspection annotation fix in the previous
commit.
-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() |