async def delete_bot(bot: str, current_user: User = Depends(auth.get_current_user)): """ Deletes bot. """ AccountProcessor.delete_bot(bot, current_user.get_user()) return {'message': 'Bot removed'}
def test_delete_bot_not_exists(self): with pytest.raises(AppException): AccountProcessor.delete_bot(pytest.deleted_bot, 'testAdmin')
def test_delete_bot(self): bot = list(AccountProcessor.list_bots(pytest.account)) pytest.deleted_bot = bot[1]['_id'] AccountProcessor.delete_bot(bot[1]['_id'], 'testAdmin')