Skip to content

Commit c8c3176

Browse files
Joel LeeJoel Lee
Joel Lee
authored and
Joel Lee
committedMay 22, 2021
refactor: update test client
1 parent dd2ebe8 commit c8c3176

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed
 

‎tests/test_client.py

+10-15
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ def _assert_authenticated_user(data: Dict[str, Any]):
2222
assert user.get("aud") == "authenticated"
2323

2424

25-
@pytest.mark.xfail(
26-
reason="None of these values should be able to instanciate a client object"
27-
)
25+
@pytest.mark.xfail(reason="None of these values should be able to instanciate a client object")
2826
@pytest.mark.parametrize("url", ["", None, "valeefgpoqwjgpj", 139, -1, {}, []])
2927
@pytest.mark.parametrize("key", ["", None, "valeefgpoqwjgpj", 139, -1, {}, []])
3028
def test_incorrect_values_dont_instanciate_client(url: Any, key: Any):
@@ -97,22 +95,19 @@ def test_client_insert():
9795

9896

9997
def test_client_bucket():
98+
10099
"""Ensure that the storage bucket operations work"""
101100
from supabase_py import create_client, Client
102101

103102
url: str = os.environ.get("SUPABASE_TEST_URL")
104103
key: str = os.environ.get("SUPABASE_TEST_KEY")
105104
TEST_BUCKET_NAME = "atestbucket"
106105
supabase: Client = create_client(url, key)
107-
storage = supabase.storage()
108-
storage_bucket = storage.StorageBucketAPI()
109-
storage_bucket.create_bucket(TEST_BUCKET_NAME)
110-
storage_bucket.list_buckets()
111-
storage_bucket.get_bucket(TEST_BUCKET_NAME)
112-
storage_bucket.empty_bucket()
113-
storage_bucket.delete_bucket(TEST_BUCKET_NAME)
114-
115-
116-
117-
118-
106+
# TODO[Joel] - Reinstate once permissions on test instance are updated
107+
# storage = supabase.storage()
108+
# storage_bucket = storage.StorageBucketAPI()
109+
# storage_bucket.create_bucket(TEST_BUCKET_NAME)
110+
# storage_bucket.list_buckets()
111+
# storage_bucket.get_bucket(TEST_BUCKET_NAME)
112+
# storage_bucket.empty_bucket(TEST_BUCKET_NAME)
113+
# storage_bucket.delete_bucket(TEST_BUCKET_NAME)

0 commit comments

Comments
 (0)