def test_can_post_in_forum_admin(self):
If you"re a forum admin, you can post even if you have no sounds, you"re within
5 minutes of the last one, and you"ve gone over the limit of posts for the day
created = datetime.datetime(2019, 2, 3, 10, 50, 00)
post = Post.objects.create(thread=self.thread, body="", author=self.user, moderation_state="OK")
post.created = created
post.save()
perm = Permission.objects.get_by_natural_key("can_moderate_forum", "forum", "post")
self.user.user_permissions.add(perm)
After Change
def test_can_post_in_forum_admin(self):
If you"re a forum admin, you can post even if you have no sounds, you"re within
5 minutes of the last one, and you"ve gone over the limit of posts for the day
created = parse_date("2019-02-03 10:50:00")
post = Post.objects.create(thread=self.thread, body="", author=self.user, moderation_state="OK")
post.created = created
post.save()
perm = Permission.objects.get_by_natural_key("can_moderate_forum", "forum", "post")
self.user.user_permissions.add(perm)