diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-06-17 12:25:52 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-06-17 12:42:23 -0400 |
commit | 773f7807cc148a8adff1d6aa55421d2bead29c54 (patch) | |
tree | da582cacaffeb67b38d55450c68dc36d52e2dc78 | |
parent | bd4d2bfba420e3b65e1b8d1097fd80318b99a924 (diff) | |
download | cherrypy-git-773f7807cc148a8adff1d6aa55421d2bead29c54.tar.gz |
Add test capturing failed expectation. Ref #1719.
-rw-r--r-- | cherrypy/test/test_auth_digest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cherrypy/test/test_auth_digest.py b/cherrypy/test/test_auth_digest.py index 0387e33e..59d2aac4 100644 --- a/cherrypy/test/test_auth_digest.py +++ b/cherrypy/test/test_auth_digest.py @@ -120,3 +120,10 @@ class DigestAuthTest(helper.CPWebCase): assert self.body == ntob( "Hello йюзер, you've been authorized.", 'utf-8', ) + + def test_wrong_scheme(self): + basic_auth = { + 'Authorization': 'Basic foo:bar', + } + self.getPage('/digest/', headers=list(basic_auth.items())) + assert self.status_code == 401 |