events: Add heartbeat events to tests and documentation.

Heartbeat events are an important part of the API, even though they
are noops, so it's important to document them.
This commit is contained in:
Tim Abbott
2021-07-01 17:13:55 -07:00
parent 3da6f3c0af
commit 64aa8f80a0
5 changed files with 59 additions and 1 deletions

View File

@@ -288,6 +288,23 @@ def check_has_zoom_token(
assert event["value"] == value
heartbeat_event = event_dict_type(
required_keys=[
# force vertical
("type", Equals("heartbeat")),
]
)
_check_hearbeat = make_checker(heartbeat_event)
def check_heartbeat(
# force vertical
var_name: str,
event: Dict[str, object],
) -> None:
_check_hearbeat(var_name, event)
_hotspot = DictType(
required_keys=[
# force vertical