MCPcopy
hub / github.com/pallets/werkzeug / test_authorization_eq

Method test_authorization_eq

tests/test_http.py:243–253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

241 assert Authorization.from_header(f"Basic {content}") is None
242
243 def test_authorization_eq(self):
244 basic1 = Authorization.from_header("Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==")
245 basic2 = Authorization(
246 "basic", {"username": "Aladdin", "password": "open sesame"}
247 )
248 assert basic1 == basic2
249 bearer1 = Authorization.from_header("Bearer abc")
250 bearer2 = Authorization("bearer", token="abc")
251 assert bearer1 == bearer2
252 assert basic1 != bearer1
253 assert basic1 != object()
254
255 def test_www_authenticate_header(self):
256 wa = WWWAuthenticate.from_header('Basic realm="WallyWorld"')

Callers

nothing calls this directly

Calls 2

AuthorizationClass · 0.90
from_headerMethod · 0.45

Tested by

no test coverage detected