[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Drop unnecessary test special casing
commit 659b03b7d293a30921f8a9269b0b6085820ced50
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sat Sep 28 13:23:41 2019 -0700
Drop unnecessary test special casing
I added this hack because construction triggered decription, which errored when
crypto modules are unavailable. Now that this has been moved into a separate
decrypt() method this test hack is no longer necessary.
---
test/unit/descriptor/__init__.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/test/unit/descriptor/__init__.py b/test/unit/descriptor/__init__.py
index 268e61e4..867ed0a4 100644
--- a/test/unit/descriptor/__init__.py
+++ b/test/unit/descriptor/__init__.py
@@ -4,8 +4,6 @@ Unit tests for stem.descriptor.
import os
-import stem.descriptor.hidden_service
-
__all__ = [
'bandwidth_file',
'collector',
@@ -51,11 +49,7 @@ def base_expect_invalid_attr_for_text(cls, default_attr, default_prefix, test, d
"""
test.assertRaises(ValueError, cls, desc_text, True)
-
- if cls == stem.descriptor.hidden_service.HiddenServiceDescriptorV3:
- desc = cls(desc_text, validate = False, skip_crypto_validation = True)
- else:
- desc = cls(desc_text, validate = False)
+ desc = cls(desc_text, validate = False)
if attr:
# check that the invalid attribute matches the expected value when
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits