def test_flatpage_admin_form_url_uniqueness_validation(self):
        data = dict(url='/myflatpage1/', **self.form_data)

        FlatpageForm(data=data).save()

        f = FlatpageForm(data=data)

        self.assertFalse(f.is_valid())

        self.assertEqual(
            f.errors,
            {'__all__': [u'Flatpage with url /myflatpage1/ already exists for site example.com']})
The flatpage admin form correctly enforces url uniqueness among flatpages of the same site
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/flatpages/tests/forms.py/FlatpageAdminFormTests.test_flatpage_admin_form_url_uniqueness_validation