[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Drop crypto from test_required_fields



commit 60fa68f6183dacc64ea1c8a3f9675e8387bb7763
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Oct 19 12:17:12 2019 -0700

    Drop crypto from test_required_fields
    
    The test at present passes without a 'ed25519_private_identity_key' argument.
    That was not part of what this is testing so reverting to what we had.
---
 test/unit/descriptor/hidden_service_v3.py | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/test/unit/descriptor/hidden_service_v3.py b/test/unit/descriptor/hidden_service_v3.py
index f49e2fb2..3c91a482 100644
--- a/test/unit/descriptor/hidden_service_v3.py
+++ b/test/unit/descriptor/hidden_service_v3.py
@@ -197,12 +197,6 @@ class TestHiddenServiceDescriptorV3(unittest.TestCase):
     Check that we require the mandatory fields.
     """
 
-    if not stem.prereq.is_crypto_available(ed25519 = True):
-      self.skipTest('(requires cryptography ed25519 support)')
-      return
-
-    from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
-
     line_to_attr = {
       'hs-descriptor': 'version',
       'descriptor-lifetime': 'lifetime',
@@ -212,10 +206,8 @@ class TestHiddenServiceDescriptorV3(unittest.TestCase):
       'signature': 'signature',
     }
 
-    private_identity_key = Ed25519PrivateKey.generate()
     for line in REQUIRED_V3_FIELDS:
-      desc_text = HiddenServiceDescriptorV3.content(exclude = (line,),
-                                                      ed25519_private_identity_key=private_identity_key)
+      desc_text = HiddenServiceDescriptorV3.content(exclude = (line,))
       expect_invalid_attr_for_text(self, desc_text, line_to_attr[line], None)
 
   def test_invalid_version(self):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits