'Test a slug collision'

def test_slug_collision(self):

    page_data = self.get_new_page_data()
    superuser = self.get_superuser()
    with self.login_user_context(superuser):
        response = self.client.post(URL_CMS_PAGE_ADD, page_data)
        self.assertRedirects(response, URL_CMS_PAGE)
        response = self.client.post(URL_CMS_PAGE_ADD, page_data)
        self.assertEqual(response.status_code, 200)
        self.assertTrue(response.request['PATH_INFO'].endswith(URL_CMS_PAGE_ADD))
        self.assertContains(response, '<ul    class="errorlist"><li>Another    page    with    this    slug    already    exists</li></ul>')
