def get_ad(name): ad = AdministrativeDomain(name=name, parent=get_root_ad()) ad.save() return ad
def get_root_ad(): ad = AdministrativeDomain(name="Discovery Tests") ad.save() return ad