コード例 #1
0
ファイル: admin.py プロジェクト: ScholzVolkmer/django-cms-old
 def test_no_softroot(self):
     with SettingsOverride(CMS_SOFTROOT=True):
         control = AttributeObject()
         contribute_list_filter(control)
     with SettingsOverride(CMS_SOFTROOT=False):
         experiment = AttributeObject()
         contribute_list_filter(experiment)
     self.assertTrue('soft_root' in control.list_filter, control.list_filter)
     self.assertFalse('soft_root' in experiment.list_filter, experiment.list_filter)
コード例 #2
0
ファイル: admin.py プロジェクト: ScholzVolkmer/django-cms-old
 def test_no_moderator(self):
     with SettingsOverride(CMS_MODERATOR=True):
         control = AttributeObject()
         contribute_list_filter(control)
     with SettingsOverride(CMS_MODERATOR=False):
         experiment = AttributeObject()
         contribute_list_filter(experiment)
     self.assertTrue('moderator_state' in control.list_filter, control.list_filter)
     self.assertFalse('moderator_state' in experiment.list_filter, experiment.list_filter)
コード例 #3
0
ファイル: admin.py プロジェクト: zhiqunq/django-cms
 def test_no_softroot(self):
     with SettingsOverride(CMS_SOFTROOT=True):
         control = AttributeObject()
         contribute_list_filter(control)
     with SettingsOverride(CMS_SOFTROOT=False):
         experiment = AttributeObject()
         contribute_list_filter(experiment)
     self.assertTrue('soft_root' in control.list_filter,
                     control.list_filter)
     self.assertFalse('soft_root' in experiment.list_filter,
                      experiment.list_filter)
コード例 #4
0
ファイル: admin.py プロジェクト: zhiqunq/django-cms
 def test_no_moderator(self):
     with SettingsOverride(CMS_MODERATOR=True):
         control = AttributeObject()
         contribute_list_filter(control)
     with SettingsOverride(CMS_MODERATOR=False):
         experiment = AttributeObject()
         contribute_list_filter(experiment)
     self.assertTrue('moderator_state' in control.list_filter,
                     control.list_filter)
     self.assertFalse('moderator_state' in experiment.list_filter,
                      experiment.list_filter)