'Trying to create document with existing locale/slug should
show validation error.'

def test_title_collision_validation(self):

    d = _create_document()
    self.client.login(username='admin', password='testpass')
    data = new_document_data()
    data['title'] = d.title
    response = self.client.post(reverse('wiki.new_document'), data)
    eq_(200, response.status_code)
    doc = pq(response.content)
    ul = doc('#document-form    >    ul.errorlist')
    eq_(1, len(ul))
    eq_('Document    with    this    Title    and    Locale    already    exists.', ul('li').text())
