summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-06-17 12:25:52 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-06-17 12:42:23 -0400
commit773f7807cc148a8adff1d6aa55421d2bead29c54 (patch)
treeda582cacaffeb67b38d55450c68dc36d52e2dc78
parentbd4d2bfba420e3b65e1b8d1097fd80318b99a924 (diff)
downloadcherrypy-git-773f7807cc148a8adff1d6aa55421d2bead29c54.tar.gz
Add test capturing failed expectation. Ref #1719.
-rw-r--r--cherrypy/test/test_auth_digest.py7
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