From ada6bd1508acab1ef98f0aee6883b99cb9cad2fd Mon Sep 17 00:00:00 2001 From: Felix Palta Date: Sat, 3 Dec 2016 23:34:00 +0300 Subject: [PATCH] Check response status code in test_digest_auth_with_wrong_password() --- test_httpbin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_httpbin.py b/test_httpbin.py index 93bdfa8..d8aade8 100755 --- a/test_httpbin.py +++ b/test_httpbin.py @@ -244,7 +244,8 @@ class HttpbinTestCase(unittest.TestCase): 'Authorization': auth_header, } ) - assert 'Digest' in response.headers.get('WWW-Authenticate') + self.assertTrue('Digest' in response.headers.get('WWW-Authenticate')) + self.assertEqual(response.status_code, 401) def test_digest_auth(self): # make first request