# client.test_helpers_events

> The test_helpers_events methods of the morevoice Python SDK: Simulate calls and events in test mode.

Simulate calls and events in test mode. These methods are on `client.test_helpers_events`, where `client` is a `MoreVoice` client (see [the Python SDK](https://docs.morevoice.ai/sdk/python/#connect)). On `AsyncMoreVoice` the same methods are awaited. Each one returns the response object and raises an exception when the API answers with an error.

## `create()`

**Send a sample event.** Test mode only. Emits one sample event of `type`: it is stored and delivered to your test-mode webhook endpoints that subscribe to it, signed and retried like any event.

```python
# client.test_helpers_events
def create(self, body: _m.TestHelperEventCreateParamsInput | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.TestHelperEvent
```

`client.test_helpers_events.create()` · `await async_client.test_helpers_events.create()` · `POST /test_helpers/events` · [API reference](https://docs.morevoice.ai/api/operations/test_helpers_events_create/)

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | yes | An event type from the catalogue, e.g. `call.ended`. |

### Returns

`TestHelperEvent`:

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"test_event"` | Always `test_event`. |
| `id` | `string` | The event's ID: it is stored and delivered like any event. |
| `type` | `string` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |

### Example

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

test_helper_event = client.test_helpers_events.create({
    "type": "call.ended",
})
print(test_helper_event)
```
