def test_update_detail_not_allowed(self): auth = UserObjectsOnlyAuthorization() bundle = Mock() bundle.request.user = self.user bundle.obj = Transaction.objects.filter(user_id=2)[0] self.assertFalse(auth.update_detail(Transaction.objects.all(), bundle))