

def test_no_soa_block2(self):
    c = Domain(name='moo')
    c.save()
    f_c = Domain(name='foo.moo')
    f_c.save()
    (s, _) = SOA.objects.get_or_create(primary='bar23', contact='Foo', description='bar')
    f_c.soa = s
    f_c.save()
    self.assertRaises(ValidationError, ensure_label_domain, 'baz.moo')

dataset/ETHPy150Open mozilla/inventory/mozdns/domain/tests/auto_create.py AutoCreateTests.test_no_soa_block2/original