def test_no_permission(self):
        req = self.req("post", "/the/url", data={"action-doit": "3"})
        req.user = Mock()
        req.user.has_perm.return_value = False

        res = self.view(
            req,
            decorator=self.actions(
                self.mock_model, ["doit"], permission="do_things")
            )

        self.assertEqual(res.status_code, 403)
        req.user.has_perm.assert_called_with("do_things")
Perform the action that happens when the backspace key is pressed.
dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_actions.py/ActionsTest.test_no_permission--crossover with--dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py/PygcurseInput.backspace