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

Function test_authenticate_quoted_qop

tests/test_wrappers.py:700–714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

698
699
700def test_authenticate_quoted_qop():
701 # Example taken from https://github.com/pallets/werkzeug/issues/633
702 resp = wrappers.Response()
703 resp.www_authenticate = WWWAuthenticate(
704 "digest", {"realm": "REALM", "nonce": "NONCE", "qop": "auth, auth-int"}
705 )
706
707 actual = resp.headers["WWW-Authenticate"]
708 expected = 'Digest realm="REALM", nonce="NONCE", qop="auth, auth-int"'
709 assert actual == expected
710
711 resp.www_authenticate.parameters["qop"] = "auth"
712 actual = resp.headers["WWW-Authenticate"]
713 expected = 'Digest realm="REALM", nonce="NONCE", qop="auth"'
714 assert actual == expected
715
716
717def test_response_stream():

Callers

nothing calls this directly

Calls 1

WWWAuthenticateClass · 0.90

Tested by

no test coverage detected