'Call ``POST /domains/{domain_id} with unsafe names``.'

def test_update_domain_unsafe(self):

    unsafe_name = 'i    am    not    /    safe'
    self.config_fixture.config(group='resource', domain_name_url_safe='off')
    ref = unit.new_domain_ref(name=unsafe_name)
    del ref['id']
    self.patch(('/domains/%(domain_id)s' % {'domain_id': self.domain_id}), body={'domain': ref})
    unsafe_name = 'i    am    still    not    /    safe'
    for config_setting in ['new', 'strict']:
        self.config_fixture.config(group='resource', domain_name_url_safe=config_setting)
        ref = unit.new_domain_ref(name=unsafe_name)
        del ref['id']
        self.patch(('/domains/%(domain_id)s' % {'domain_id': self.domain_id}), body={'domain': ref}, expected_status=http_client.BAD_REQUEST)
