'Domains should be relinked after deletion'

def test_symlink_cname_dont_link_missing_domains(self):

    self.domain = get(Domain, project=self.project, domain='woot.com', url='http://woot.com', cname=True)
    self.symlink.symlink_cnames()
    filesystem = {'private_cname_project': {'woot.com': {'type': 'link', 'target': 'user_builds/kong'}}, 'private_cname_root': {'woot.com': {'type': 'link', 'target': 'private_web_root/kong'}}, 'private_web_root': {'kong': {'en': {}}}, 'public_cname_project': {'woot.com': {'type': 'link', 'target': 'user_builds/kong'}}, 'public_cname_root': {'woot.com': {'type': 'link', 'target': 'public_web_root/kong'}}, 'public_web_root': {'kong': {'en': {'latest': {'type': 'link', 'target': 'user_builds/kong/rtd-builds/latest'}}}}}
    if (self.privacy == 'private'):
        public_root = filesystem['public_web_root'].copy()
        private_root = filesystem['private_web_root'].copy()
        filesystem['public_web_root'] = private_root
        filesystem['private_web_root'] = public_root
    self.assertFilesystem(filesystem)
    self.domain.delete()
    filesystem['private_cname_root'] = {}
    filesystem['public_cname_root'] = {}
    self.symlink.symlink_cnames()
    self.assertFilesystem(filesystem)
