Example #1
0
    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))
Example #2
0
    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))