'The flatpage admin form correctly enforces url uniqueness among flatpages of the same site'

def test_flatpage_admin_form_url_uniqueness_validation(self):

    data = dict(url=u'/myflatpage1/', **self.form_data)
    FlatpageForm(data=data).save()
    f = FlatpageForm(data=data)
    self.assertFalse(f.is_valid())
    self.assertEqual(f.errors, {u'__all__': [u'Flatpage    with    url    /myflatpage1/    already    exists    for    site    example.com']})
