コード例 #1
0
ファイル: users.py プロジェクト: ashokcse/openstack-bill
 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
ファイル: users.py プロジェクト: yuzawataka/colony
 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())
コード例 #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()
コード例 #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
ファイル: users.py プロジェクト: ntt-pf-lab/horizon
 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())