commit 4f1fb3a9e791fdac288a683831e49ef0493a6740 Author: Damian Johnson atagar@torproject.org Date: Wed Nov 6 12:02:07 2019 -0800
Resume test_inner_layer() checks
Adapting a couple checks I disabled earlier. --- test/unit/descriptor/hidden_service_v3.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/test/unit/descriptor/hidden_service_v3.py b/test/unit/descriptor/hidden_service_v3.py index 61752e11..b0f1829a 100644 --- a/test/unit/descriptor/hidden_service_v3.py +++ b/test/unit/descriptor/hidden_service_v3.py @@ -14,12 +14,6 @@ import stem.prereq
import test.require
-from test.unit.descriptor import ( - get_resource, - base_expect_invalid_attr, - base_expect_invalid_attr_for_text, -) - from stem.descriptor.hidden_service import ( IntroductionPointV3, HiddenServiceDescriptorV3, @@ -27,6 +21,12 @@ from stem.descriptor.hidden_service import ( InnerLayer, )
+from test.unit.descriptor import ( + get_resource, + base_expect_invalid_attr, + base_expect_invalid_attr_for_text, +) + try: # added in python 3.3 from unittest.mock import patch, Mock @@ -142,15 +142,11 @@ class TestHiddenServiceDescriptorV3(unittest.TestCase): self.assertEqual('1.2.3.4', link_specifier.address) self.assertEqual(9001, link_specifier.port)
- # TODO: the following doesn't pass with recent HiddenServiceDescriptorV3 changes - - return - - self.assertEqual('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', intro_point.onion_key) - self.assertTrue('ID2l9EFNrp' in intro_point.auth_key) - self.assertEqual('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', intro_point.enc_key) + self.assertEqual('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', intro_point.onion_key_raw) + self.assertTrue('ID2l9EFNrp' in intro_point.auth_key_cert.to_base64()) + self.assertEqual('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', intro_point.enc_key_raw) self.assertTrue('ZvjPt5IfeQ', intro_point.enc_key_cert) - self.assertEqual(None, intro_point.legacy_key) + self.assertEqual(None, intro_point.legacy_key_raw) self.assertEqual(None, intro_point.legacy_key_cert)
def test_required_fields(self):
tor-commits@lists.torproject.org