'Existing flatpages can be edited in the admin form without triggering
the url-uniqueness validation.'

def test_flatpage_admin_form_edit(self):

    existing = FlatPage.objects.create(url=u'/myflatpage1/', title=u'Some    page', content=u'The    content')
    existing.sites.add(settings.SITE_ID)
    data = dict(url=u'/myflatpage1/', **self.form_data)
    f = FlatpageForm(data=data, instance=existing)
    self.assertTrue(f.is_valid(), f.errors)
    updated = f.save()
    self.assertEqual(updated.title, u'A    test    page')
