Skip to content

Commit

Permalink
test: add realtime sync test
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Sep 6, 2024
1 parent ae97452 commit 8e40a99
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 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,17 @@ 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 8e40a99

Please sign in to comment.