示例#1
0
 def handle(self, request, data):
     user_id = data['user']
     LOG.info('Deleting user with id "%s"' % user_id)
     api.user_delete(request, user_id)
     messages.info(request, '%s was successfully deleted.'
                             % user_id)
     return redirect(request.build_absolute_uri())
示例#2
0
 def handle(self, request, data):
     user_id = data['user']
     LOG.info('Deleting user with id "%s"' % user_id)
     api.user_delete(request, user_id)
     messages.info(request, '%s was successfully deleted.'
                             % user_id)
     return redirect(request.build_absolute_uri())
    def test_user_delete(self):
        account_api = self.stub_account_api()

        account_api.users = self.mox.CreateMockAnything()
        account_api.users.delete(TEST_USERNAME).AndReturn(TEST_RETURN)

        self.mox.ReplayAll()

        ret_val = api.user_delete(self.request, TEST_USERNAME)

        self.assertIsNone(ret_val)

        self.mox.VerifyAll()
示例#4
0
 def handle(self, request, data):
     user_id = data["user"]
     api.user_delete(request, user_id)
     messages.success(request, "%s was successfully deleted." % user_id)
     return redirect(request.build_absolute_uri())
示例#5
0
 def handle(self, request, data):
     user_id = data["user"]
     LOG.info('Deleting user with id "%s"' % user_id)
     api.user_delete(request, user_id)
     messages.info(request, _("%(user)s was successfully deleted.") % {"user": user_id})
     return redirect(request.build_absolute_uri())