py.test-ified test_get_domain test.