Skip to content

Commit

Permalink
test: add realtime sync test (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Sep 12, 2024
1 parent ae97452 commit bf252a2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/test_realtime_configuration.py → tests/test_realtime.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import supabase


def test_functions_client_initialization() -> None:
def test_realtime_client_initialization() -> None:
ref = "ooqqmozurnggtljmjkii"
url = f"https://{ref}.supabase.co"
# Sample JWT Key
Expand All @@ -12,3 +12,16 @@ def test_functions_client_initialization() -> None:
url = "http://localhost:54322"
sp_local = supabase.Client(url, key)
assert sp_local.realtime_url == f"ws://localhost:54322/realtime/v1"


def test_sync_realtime():
ref = "ooqqmozurnggtljmjkii"
url = f"https://{ref}.supabase.co"
# Sample JWT Key
key = "xxxxxxxxxxxxxx.xxxxxxxxxxxxxxx.xxxxxxxxxxxxxxx"
sp = supabase.Client(url, key)

try:
channel = sp.realtime.channel("test")
except NotImplementedError:
pass

0 comments on commit bf252a2

Please sign in to comment.