コード例 #1
0
def register_channel():
    logger.info(f"Attempting to register new channel in team.")
    req = ClientRequest(request)
    new_channel = ChannelService.create_channel(req.new_channel_data())
    return jsonify(new_channel.json()), new_channel.status_code()
コード例 #2
0
 def test_new_channel_data_with_full_data_without_visibility_works_properly(
         self):
     body_json = {"team_id": 0, "name": "test"}
     input_request = Request(body=body_json, headers=authentication_headers)
     client_request = ClientRequest(input_request)
     self.assertIsInstance(client_request.new_channel_data(), NewChannelDTO)