示例#1
0
文件: admin.py 项目: 42/django-cms
 def test_05_admin_dialog_form_moderation_and_permisison(self):
     with SettingsOverride(CMS_MODERATOR=True, CMS_PERMISSION=True):
         result = _form_class_selector()
         self.assertEqual(result, PermissionAndModeratorForm)
示例#2
0
文件: admin.py 项目: 42/django-cms
 def test_04_admin_dialog_form_permission_only(self):
     with SettingsOverride(CMS_MODERATOR=False, CMS_PERMISSION=True):
         result = _form_class_selector()
         self.assertEqual(result, PermissionForm)
示例#3
0
文件: admin.py 项目: 42/django-cms
 def test_05_admin_dialog_form_moderation_only(self):
     with SettingsOverride(CMS_MODERATOR=True, CMS_PERMISSION=False):
         result = _form_class_selector()
         self.assertEqual(result, ModeratorForm)
示例#4
0
文件: admin.py 项目: 42/django-cms
 def test_03_admin_dialog_form_no_moderation_or_permissions(self):
     with SettingsOverride(CMS_MODERATOR=False, CMS_PERMISSION=False):
         result = _form_class_selector()
         self.assertEqual(result, None)