Exemplo n.º 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())
Exemplo n.º 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())
Exemplo n.º 3
0
    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()
Exemplo n.º 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())
Exemplo n.º 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())