3 from gi.repository import GLib
6 class TestUris(unittest.TestCase):
7 def testExtractUris(self):
8 uri_list_text = """# urn:isbn:0-201-08372-8
9 http://www.huh.org/books/foo.html
10 http://www.huh.org/books/foo.pdf
11 ftp://ftp.foo.org/books/foo.txt
13 uri_list = GLib.uri_list_extract_uris(uri_list_text)
14 assert uri_list[0] == "http://www.huh.org/books/foo.html"
15 assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
16 assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"