Ejemplo n.º 1
0
def test_dns_two(monkeypatch):
    monkeypatch.setattr(dugong, 'DNS_TEST_HOSTNAMES',
                        (('grumpf.invalid', 80),))
    with pytest.raises(dugong.DNSUnavailable):
        conn = HTTPConnection('foobar.invalid')
        conn.connect()
Ejemplo n.º 2
0
def test_dns_two(monkeypatch):
    monkeypatch.setattr(dugong, 'DNS_TEST_HOSTNAMES',
                        (('grumpf.invalid', 80), ))
    with pytest.raises(dugong.DNSUnavailable):
        conn = HTTPConnection('foobar.invalid')
        conn.connect()
Ejemplo n.º 3
0
def test_dns_one(monkeypatch):
    monkeypatch.setattr(dugong, 'DNS_TEST_HOSTNAMES',
                        (('localhost', 80),))
    with pytest.raises(dugong.HostnameNotResolvable):
        conn = HTTPConnection('foobar.invalid')
        conn.connect()
Ejemplo n.º 4
0
def test_dns_one(monkeypatch):
    monkeypatch.setattr(dugong, 'DNS_TEST_HOSTNAMES', (('localhost', 80), ))
    with pytest.raises(dugong.HostnameNotResolvable):
        conn = HTTPConnection('foobar.invalid')
        conn.connect()