예제 #1
0
def test_is_subdomain():
    from pajbot.modules.linkchecker import is_subdomain

    assert is_subdomain("pajlada.se", "pajlada.se")
    assert is_subdomain("test.pajlada.se", "pajlada.se")

    assert not is_subdomain("test.pajlada.se", "pajlada.com")
    assert not is_subdomain("kastaren.com", "roleplayer.se")
    assert not is_subdomain("foo.bar.com", "foobar.com")
예제 #2
0
    def test_is_subdomain(self):
        from pajbot.modules.linkchecker import is_subdomain

        self.assertTrue(is_subdomain('pajlada.se', 'pajlada.se'))
        self.assertTrue(is_subdomain('test.pajlada.se', 'pajlada.se'))

        self.assertFalse(is_subdomain('test.pajlada.se', 'pajlada.com'))
        self.assertFalse(is_subdomain('kastaren.com', 'roleplayer.se'))
        self.assertFalse(is_subdomain('foo.bar.com', 'foobar.com'))
예제 #3
0
파일: tests.py 프로젝트: Nacht123/pajbot
    def test_is_subdomain(self):
        from pajbot.modules.linkchecker import is_subdomain

        self.assertTrue(is_subdomain('pajlada.se', 'pajlada.se'))
        self.assertTrue(is_subdomain('test.pajlada.se', 'pajlada.se'))

        self.assertFalse(is_subdomain('test.pajlada.se', 'pajlada.com'))
        self.assertFalse(is_subdomain('kastaren.com', 'roleplayer.se'))
        self.assertFalse(is_subdomain('foo.bar.com', 'foobar.com'))