def delete_channel(team_id, channel_id): logger.info( f"Attempting to delete channel #{channel_id} from team #{team_id}") req = ClientRequest(request) old_channel = ChannelService.delete_channel( req.channel_authentication_data(team_id, channel_id)) return jsonify(old_channel.json()), old_channel.status_code()
def test_channel_authentication_data_with_authentication_header_works_properly( self): input_request = Request(headers=authentication_headers) client_request = ClientRequest(input_request) self.assertIsInstance( client_request.channel_authentication_data(mock, mock), ChannelAuthenticationDTO)
def channel_members(team_id, channel_id): logger.info( f"Attempting to get members from team #{team_id}'s channel #{channel_id}." ) req = ClientRequest(request) new_member = ChannelService.channel_members( req.channel_authentication_data(team_id, channel_id)) return jsonify(new_member.json()), new_member.status_code()
def leave_channel(team_id, channel_id): logger.info(f"Attempting to leave channel #{channel_id}") req = ClientRequest(request) old_member = ChannelService.leave_channel( req.channel_authentication_data(team_id, channel_id)) return jsonify(old_member.json()), old_member.status_code()