def test_uninstall_apphooks_with_apphook(self):
out = StringIO()
create_page('Hello Title', "nav_playground.html", "en", apphook=APPHOOK)
self.assertEqual(Page.objects.filter(application_urls=APPHOOK).count(), 1)
management.call_command('cms', 'uninstall', 'apphooks', APPHOOK, interactive=False, stdout=out)
self.assertEqual(out.getvalue(), "1 'SampleApp' apphooks uninstalled\n")
self.assertEqual(Page.objects.filter(application_urls=APPHOOK).count(), 0)
评论列表
文章目录