[tor-commits] [bridgedb/master] Discard attribute that's no longer used.
phw at torproject.org
phw at torproject.org
Wed Feb 19 18:26:38 UTC 2020
commit b452f6f9ffb4992bb6be00763ce53ee0e5479878
Author: Philipp Winter <phw at nymity.ch>
Date: Wed Jan 29 18:10:41 2020 -0800
Discard attribute that's no longer used.
This fixes the following unit test:
[ERROR]
Traceback (most recent call last):
File "/home/travis/build/NullHypothesis/bridgedb/bridgedb/test/test_https.py", line 177, in test_content_security_policy
headers = ''.join(self.br.response().info().headers)
builtins.AttributeError: 'HTTPMessage' object has no attribute 'headers'
bridgedb.test.test_https.HTTPTests.test_content_security_policy
---
bridgedb/test/test_https.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bridgedb/test/test_https.py b/bridgedb/test/test_https.py
index 52ad936..00a6fd9 100644
--- a/bridgedb/test/test_https.py
+++ b/bridgedb/test/test_https.py
@@ -174,10 +174,10 @@ class HTTPTests(unittest.TestCase):
self.br.set_debug_http(True)
self.br.open(HTTP_ROOT)
- headers = ''.join(self.br.response().info().headers)
+ headers = self.br.response().info()
- self.assertIn("Content-Security-Policy", headers)
- self.assertIn("default-src 'none';", headers)
+ self.assertIn("Content-Security-Policy", headers.keys())
+ self.assertIn("default-src 'none';", ''.join(headers.values()))
def test_404(self):
"""Asking for a non-existent resource should yield our custom 404 page,
More information about the tor-commits
mailing list