File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ def test_basic_auth():
2626 flow .send (response )
2727
2828
29- def test_bearer_token_auth ():
30- auth = httpx .BearerTokenAuth (bearer_token = "my_token " )
29+ def test_bearer_token_auth_header ():
30+ auth = httpx .BearerTokenAuth (bearer_token = "secret " )
3131 request = httpx .Request ("GET" , "https://www.example.com" )
3232
3333 # The initial request should include a bearer token auth header.
@@ -41,6 +41,22 @@ def test_bearer_token_auth():
4141 flow .send (response )
4242
4343
44+ def test_bearer_token_auth_form_encoded ():
45+ with pytest .raises (
46+ NotImplementedError ,
47+ ):
48+ auth = httpx .BearerTokenAuth (bearer_token = "secret" , variant = "FORM-ENCODED" )
49+ assert auth # pragma: no cover
50+
51+
52+ def test_bearer_token_auth_query ():
53+ with pytest .raises (
54+ NotImplementedError ,
55+ ):
56+ auth = httpx .BearerTokenAuth (bearer_token = "secret" , variant = "QUERY" )
57+ assert auth # pragma: no cover
58+
59+
4460def test_digest_auth_with_200 ():
4561 auth = httpx .DigestAuth (username = "user" , password = "pass" )
4662 request = httpx .Request ("GET" , "https://www.example.com" )
You can’t perform that action at this time.
0 commit comments