Example #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, _('%(user)s was successfully deleted.')
                             % {"user": user_id})
     return shortcuts.redirect(request.build_absolute_uri())
Example #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,
         _('%(user)s was successfully deleted.') % {"user": user_id})
     return shortcuts.redirect(request.build_absolute_uri())
Example #3
0
    def test_user_delete(self):
        keystoneclient = self.stub_keystoneclient()

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

        self.mox.ReplayAll()

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

        self.assertIsNone(ret_val)