Exemple #1
0
class TestPyDomainr(unittest.TestCase):
    def setUp(self):
        self.dom = PyDomainr("test_id", "naumanahm.ad")
        self.second_dom = PyDomainr("test_id", "pydomai.nr")

    def test_api_search(self):
        ex = [
            u'naumanahm.ad', u'naumanah.ma', u'naumana.hm', u'nauma.na',
            u'nau.ma'
        ]
        self.assertEquals(self.dom.available_domains(), ex)

    def test_taken_domains(self):
        ex = [u'naumanahm.ad.com.pk']
        self.assertEquals(self.dom.taken_domains(), ex)

    def test_available(self):
        self.assertFalse(self.dom.is_available)
        self.assertTrue(self.second_dom.is_available)

    def test_whois_url(self):
        ex = "https://domai.nr/naumanahm.ad/whois"
        self.assertEquals(self.dom.whois_url, ex)

    def test_registrar(self):
        ex = "101domain.com"
        self.assertEquals(self.dom.registrar, ex)

    def test_registrar_name(self):
        ex = "101domain"
        self.assertEquals(self.dom.registrar_name, ex)

    def test_register_url(self):
        ex = "https://domai.nr/naumanahm.ad/register/101domain.com"
        self.assertEquals(self.dom.register_url, ex)

    def test_iana_url(self):
        ex = "https://domai.nr/ad/iana"
        self.assertEquals(self.dom.iana_url, ex)

    def test_subdomain(self):
        ex = "naumanahm.ad"
        self.assertEquals(self.dom.subdomain, ex)

    def test_domain(self):
        ex = "naumanahm.ad"
        self.assertEquals(self.dom.subdomain, ex)

    def test_www_url(self):
        ex = "https://domai.nr/naumanahm.ad/www"
        self.assertEquals(self.dom.www_url, ex)
class TestPyDomainr(unittest.TestCase):
    def setUp(self):
        self.dom = PyDomainr("test_id", "naumanahm.ad")
        self.second_dom = PyDomainr("test_id", "pydomai.nr")

    def test_api_search(self):
        ex = [u'naumanahm.ad', u'naumanah.ma', u'naumana.hm', u'nauma.na',
              u'nau.ma']
        self.assertEquals(self.dom.available_domains(), ex)

    def test_taken_domains(self):
        ex = [u'naumanahm.ad.com.pk']
        self.assertEquals(self.dom.taken_domains(), ex)

    def test_available(self):
        self.assertFalse(self.dom.is_available)
        self.assertTrue(self.second_dom.is_available)

    def test_whois_url(self):
        ex = "https://domai.nr/naumanahm.ad/whois"
        self.assertEquals(self.dom.whois_url, ex)

    def test_registrar(self):
        ex = "101domain.com"
        self.assertEquals(self.dom.registrar, ex)

    def test_registrar_name(self):
        ex = "101domain"
        self.assertEquals(self.dom.registrar_name, ex)

    def test_register_url(self):
        ex = "https://domai.nr/naumanahm.ad/register/101domain.com"
        self.assertEquals(self.dom.register_url, ex)

    def test_iana_url(self):
        ex = "https://domai.nr/ad/iana"
        self.assertEquals(self.dom.iana_url, ex)

    def test_subdomain(self):
        ex = "naumanahm.ad"
        self.assertEquals(self.dom.subdomain, ex)

    def test_domain(self):
        ex = "naumanahm.ad"
        self.assertEquals(self.dom.subdomain, ex)

    def test_www_url(self):
        ex = "https://domai.nr/naumanahm.ad/www"
        self.assertEquals(self.dom.www_url, ex)
Exemple #3
0
 def setUp(self):
     self.dom = PyDomainr("test_id", "naumanahm.ad")
     self.second_dom = PyDomainr("test_id", "pydomai.nr")
 def setUp(self):
     self.dom = PyDomainr("test_id", "naumanahm.ad")
     self.second_dom = PyDomainr("test_id", "pydomai.nr")
Exemple #5
0
from pydomainr import PyDomainr
dom = PyDomainr("naumanahmad.com")
for i in dom.taken_domains():
    print i