5 class TestUris(unittest.TestCase):
6 def testExtractUris(self):
7 uri_list_text = "# urn:isbn:0-201-08372-8\n" + \
8 "http://www.huh.org/books/foo.html\n" + \
9 "http://www.huh.org/books/foo.pdf\n" + \
10 "ftp://ftp.foo.org/books/foo.txt\n"
11 uri_list = glib.uri_list_extract_uris(uri_list_text)
12 assert uri_list[0] == "http://www.huh.org/books/foo.html"
13 assert uri_list[1] == "http://www.huh.org/books/foo.pdf"
14 assert uri_list[2] == "ftp://ftp.foo.org/books/foo.txt"