Exemplo n.º 1
0
    def test_url_is_same_as_given_url(self):
        link = Link("http://www.friendpage.com",
                    "A link",
                    parent_url="http://www.apage.com")

        is_same = link.is_same_as("http://www.friendpage.com")

        self.assertTrue(is_same)
Exemplo n.º 2
0
    def test_url_is_not_same_as_given_url(self):
        link = Link("http://www.friendpage.com",
                    "A link",
                    parent_url="http://www.apage.com")

        is_same = link.is_same_as("http://www.somethingrandom.com")

        self.assertFalse(is_same)
Exemplo n.º 3
0
    def test_relative_url_is_not_same_as_given_url(self):
        link = Link("/about", "A link", parent_url="http://www.apage.com")

        is_same = link.is_same_as("http://www.apage.com")

        self.assertFalse(is_same)