# -*- coding: utf-8 -*-1"""2Test the is_url utility3"""45# ****************************************************************************6# Copyright (C) 2016 Volker Braun <[email protected]>7#8# This program is free software: you can redistribute it and/or modify9# it under the terms of the GNU General Public License as published by10# the Free Software Foundation, either version 2 of the License, or11# (at your option) any later version.12# https://www.gnu.org/licenses/13# ****************************************************************************141516import unittest1718from sage_bootstrap.util import is_url192021class IsUrlTestCase(unittest.TestCase):2223def test_http(self):24self.assertTrue(is_url('http://foo.bar/baz'))2526def test_https(self):27self.assertTrue(is_url('https://foo.bar/baz'))2829def test_ftp(self):30self.assertTrue(is_url('ftp://foo.bar/baz'))3132def test_nospace(self):33self.assertFalse(is_url('http://foo. bar/baz'))3435def test_single_line(self):36self.assertFalse(is_url('http://foo.bar/baz\nhttp://foo.bar/baz'))373839