def test_can_hide_both(self, m_user_admin_of_group):
        'Can the author that is an admin hide a post'
        m_user_admin_of_group.return_value = True
        post = {'author_id': self.userInfo.id}
        groupInfo = MagicMock()
        r = can_hide_post(self.userInfo, groupInfo, post)

        self.assertTrue(r)
    def test_can_hide_other(self, m_user_admin_of_group):
        'Is someone else prevented from hiding a post'
        m_user_admin_of_group.return_value = False
        post = {'author_id': 'other'}
        groupInfo = MagicMock()
        r = can_hide_post(self.userInfo, groupInfo, post)

        self.assertFalse(r)