Пример #1
0
 def _do_delete_work(self):
     # If there are still numbers to delete, do so.  If not, delete the user and return.
     if len(self._numbers) > 0:
         api_numbers.remove_public_id(self.db_session(), self._numbers.pop()["number"],
                                      self._on_delete_post_success, self._on_delete_post_failure, True)
     else:
         _log.debug("Deleting user %s", self._user_id)
         db_sess = self.db_session()
         users.delete_user(db_sess, self._user_id)
         db_sess.commit()
         self.send_success(httplib.NO_CONTENT)
Пример #2
0
 def _do_delete_work(self):
     # If there are still numbers to delete, do so.  If not, delete the user and return.
     if len(self._numbers) > 0:
         api_numbers.remove_public_id(self.db_session(),
                                      self._numbers.pop()["number"],
                                      self._on_delete_post_success,
                                      self._on_delete_post_failure, True)
     else:
         _log.debug("Deleting user %s", self._user_id)
         db_sess = self.db_session()
         users.delete_user(db_sess, self._user_id)
         db_sess.commit()
         self.send_success(httplib.NO_CONTENT)
Пример #3
0
 def test_delete_mainline(self):
     users.delete_user(self.mock_session, "1234567890abcfef")
Пример #4
0
 def test_delete_mainline(self):
     users.delete_user(self.mock_session, "1234567890abcfef")