'Test domain deletion clears the domain configs.'

def test_delete_domain_deletes_configs(self):

    domain = unit.new_domain_ref()
    self.resource_api.create_domain(domain['id'], domain)
    config = {'ldap': {'url': uuid.uuid4().hex, 'user_tree_dn': uuid.uuid4().hex, 'password': uuid.uuid4().hex}}
    self.domain_config_api.create_config(domain['id'], config)
    domain['enabled'] = False
    self.resource_api.update_domain(domain['id'], domain)
    self.resource_api.delete_domain(domain['id'])
    self.assertRaises(exception.DomainConfigNotFound, self.domain_config_api.get_config, domain['id'])
    self.assertDictEqual({}, self.domain_config_api.get_config_with_sensitive_info(domain['id']))
