From 84edf61ad61ccd4bb7ecdf47fdeeffd49014cb73 Mon Sep 17 00:00:00 2001 From: Marek Ruszczak Date: Sun, 9 Jul 2017 19:26:01 +0200 Subject: [PATCH] Split and strip qop. --- test_httpbin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_httpbin.py b/test_httpbin.py index 40a2a04..a3ad77c 100755 --- a/test_httpbin.py +++ b/test_httpbin.py @@ -344,7 +344,7 @@ class HttpbinTestCase(unittest.TestCase): realm = d['realm'] opaque = d['opaque'] if qop : - self.assertIn(qop, d['qop'].split(', '), 'Challenge should contains expected qop') + self.assertIn(qop, [x.strip() for x in d['qop'].split(',')], 'Challenge should contains expected qop') algorithm = d['algorithm'] cnonce, nc = (_hash(os.urandom(10), "MD5"), '{:08}'.format(nc)) if qop in ('auth', 'auth-int') else (None, None)