#NEWLINE# def test_digest_auth_prompt_with_custom_realm( self ) : #NEWLINE# #INDENT# response = self . client . get ( '/digest-with-realm' ) #NEWLINE# self . assertEqual ( response . status_code , 401 ) #NEWLINE# self . assertTrue ( ( 'WWW-Authenticate' in response . headers ) ) #NEWLINE# self . assertTrue ( re . match ( '^Digest realm="My Realm",nonce="[0-9a-f]+",opaque="[0-9a-f]+"$' , response . headers [ 'WWW-Authenticate' ] ) )