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()
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()
def test_dns_one(monkeypatch): monkeypatch.setattr(dugong, 'DNS_TEST_HOSTNAMES', (('localhost', 80),)) with pytest.raises(dugong.HostnameNotResolvable): conn = HTTPConnection('foobar.invalid') conn.connect()
def test_dns_one(monkeypatch): monkeypatch.setattr(dugong, 'DNS_TEST_HOSTNAMES', (('localhost', 80), )) with pytest.raises(dugong.HostnameNotResolvable): conn = HTTPConnection('foobar.invalid') conn.connect()