def test_domain_validation_basic():
	try:
		import DNS
	except __HOLE__:
		pytest.skip("PyDNS not installed.")

	mock = DomainValidator()
	dataset = [
			('example.com', ''),
			('xn--ls8h.la', ''), # IDN: (poop).la
			('', 'Invalid domain: It cannot be empty.'),
			('-bad.example.com', 'Invalid domain.'),
		]

	def closure(domain, expect):
		assert mock.validate_domain(domain) == (domain, expect)

	for domain, expect in dataset:
		yield closure, domain, expect
dataset/ETHPy150Open marrow/mailer/test/test_validator.py/test_domain_validation_basic