Join an existing conversation.
(self, conversation_id: str)
| 208 | return None |
| 209 | |
| 210 | async def join_conversation(self, conversation_id: str): |
| 211 | """Join an existing conversation.""" |
| 212 | try: |
| 213 | start_time = time.perf_counter() |
| 214 | |
| 215 | response = await self.http_client.post( |
| 216 | f"/chat/{conversation_id}/join", |
| 217 | json={"participant": {"participantId": self.client_id, "displayName": f"User {self.client_id}"}}, |
| 218 | headers={"Authorization": f"Bearer token_{self.client_id}"} |
| 219 | ) |
| 220 | |
| 221 | if response.status_code == 200: |
| 222 | self.conversation_id = conversation_id |
| 223 | |
| 224 | end_time = time.perf_counter() |
| 225 | return end_time - start_time |
| 226 | |
| 227 | except Exception as e: |
| 228 | self.errors += 1 |
| 229 | return None |
| 230 | |
| 231 | |
| 232 | @pytest.fixture |
no outgoing calls
no test coverage detected