'Test moving the reverse_id validation error to a field specific one'

def test_reverse_id_error_location(self):

    dupe_id = 'p1'
    curren_site = Site.objects.get_current()
    create_page('Page    1', 'nav_playground.html', 'en', reverse_id=dupe_id)
    page2 = create_page('Page    2', 'nav_playground.html', 'en')
    page2_data = {'language': 'en', 'site': curren_site.pk, 'reverse_id': dupe_id, 'template': 'col_two.html'}
    form = AdvancedSettingsForm(data=page2_data, instance=page2, files=None)
    self.assertFalse(form.is_valid())
    self.assertNotIn('__all__', form.errors)
    self.assertIn('reverse_id', form.errors)
    self.assertEqual(1, len(form.errors['reverse_id']))
    self.assertEqual([u'A    page    with    this    reverse    URL    id    exists    already.'], form.errors['reverse_id'])
    page2_data['reverse_id'] = ''
    form = AdvancedSettingsForm(data=page2_data, instance=page2, files=None)
    self.assertTrue(form.is_valid())
    admin_user = self._get_guys(admin_only=True)
    page2 = page2.reload()
    page2.site = curren_site
    page2.save()
    with self.login_user_context(admin_user):
        page2_data['reverse_id'] = dupe_id
        page2_data['site'] = curren_site.pk
        resp = self.client.post((base.URL_CMS_PAGE_ADVANCED_CHANGE % page2.pk), page2_data)
        self.assertContains(resp, '<div    class="form-row    errors    field-reverse_id">')
