Spaces:
Running
Running
File size: 313 Bytes
287a0bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import pytest
def test_invalid_auth_cred(api_wrong_cred):
with pytest.raises(Exception) as e:
api_wrong_cred.list_collections()
assert "Unauthorized" in str(e.value)
def test_server_basic_auth(api_with_server_auth):
cols = api_with_server_auth.list_collections()
assert len(cols) == 0
|