

def test_extend_doesnt_touch(self):
    root_domain = create_fake_zone('foo.mozilla.com', suffix='')
    shouldnt_be_touched = AddressRecord.objects.create(label='', domain=root_domain, ip_str='10.0.0.1', ip_type='4')
    (label, baz_domain) = ensure_label_domain('bar.baz.foo.mozilla.com')
    AddressRecord.objects.create(label=label, domain=baz_domain, ip_str='10.0.0.1', ip_type='4')
    AddressRecord.objects.filter(pk=shouldnt_be_touched.pk).update(label='shouldnt be touched')
    ensure_label_domain('wee.boo.bar.baz.foo.mozilla.com')
    self.assertEqual('shouldnt be touched', AddressRecord.objects.get(pk=shouldnt_be_touched.pk).label)

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