def test_publish_limits(self):
        with self.login_user_context(self.user):
            with self.settings(CMS_MAX_PAGE_PUBLISH_REVERSIONS=2, CMS_MAX_PAGE_HISTORY_REVERSIONS=2):
                page = Page.objects.all()[0]
                page_pk = page.pk
                self.assertEqual(Revision.objects.all().count(), 4)
                for x in range(10):
                    publish_url = URL_CMS_PAGE + "%s/en/publish/" % page_pk
                    response = self.client.post(publish_url)
                    self.assertEqual(response.status_code, 302)
                self.assertEqual(Revision.objects.all().count(), 4)
dataset/ETHPy150Open divio/django-cms/cms/tests/test_reversion_tests.py/ReversionTestCase.test_publish_limits/original