Skip to content

Commit

Permalink
on_notify を追加する
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jun 21, 2023
1 parent b4d8a64 commit 66efdee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_recvonly.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ def on_disconnect(error_code, message: str):
print(f'on_disconnect: error_code: {error_code}, message: {message}')


def on_notify(raw_message: str):
print(f'on_notify: raw_message: {raw_message}')


def test_sendonly():
sora = Sora()

Expand All @@ -18,6 +22,7 @@ def test_sendonly():
metadata={"access_token": os.environ.get("TEST_SECRET_KEY")}
)

conn.on_notify = on_notify
conn.on_disconnect = on_disconnect
conn.connect()
time.sleep(3)
Expand Down

0 comments on commit 66efdee

Please sign in to comment.