mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
deprecate CanCreateMixin
Les motifs de cette déprécation sont indiqués dans la documentation. Le mixin a été remplacé par `PermissionRequiredMixin` dans les endroits où ce remplacement était aisé.
This commit is contained in:
@ -159,13 +159,13 @@ class TestNews(TestCase):
|
||||
|
||||
def test_news_viewer(self):
|
||||
"""Test that moderated news can be viewed by anyone
|
||||
and not moderated news only by com admins.
|
||||
and not moderated news only by com admins and by their author.
|
||||
"""
|
||||
# by default a news isn't moderated
|
||||
# by default news aren't moderated
|
||||
assert self.new.can_be_viewed_by(self.com_admin)
|
||||
assert self.new.can_be_viewed_by(self.author)
|
||||
assert not self.new.can_be_viewed_by(self.sli)
|
||||
assert not self.new.can_be_viewed_by(self.anonymous)
|
||||
assert not self.new.can_be_viewed_by(self.author)
|
||||
|
||||
self.new.is_moderated = True
|
||||
self.new.save()
|
||||
|
Reference in New Issue
Block a user