Skip to content

Commit

Permalink
fix token test
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wang-1990 committed Oct 31, 2024
1 parent 41092ba commit 737f021
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/unit/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def test_u2m(self):
headers2 = headers_fn2()
assert headers == headers2

@pytest.mark.skip(reason="Broken after rewriting auth")
class TestTokenAuth:
def test_token(self):
host = "my.cloud.databricks.com"
Expand All @@ -65,20 +64,18 @@ def test_token(self):
http_path="http://foo",
schema="dbt",
)
provider = creds.authenticate(None)
credentialManager = creds.authenticate()
provider = credentialManager.credentials_provider()
assert provider is not None

headers_fn = provider()
headers_fn = provider
headers = headers_fn()
assert headers is not None

raw = provider.as_dict()
raw = credentialManager._config.as_dict()
assert raw is not None

provider_b = creds._provider_from_dict()
headers_fn2 = provider_b()
headers2 = headers_fn2()
assert headers == headers2
assert headers == {"Authorization":"Bearer foo"}


class TestShardedPassword:
Expand Down

0 comments on commit 737f021

Please sign in to comment.