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

[tor-commits] [stem/master] Adjust test expectation for the different exception rising from Size



commit cb9ff0b16dcac642daa8664a84326d802bead157
Author: Dave Rolek <dmr-x@xxxxxxxxxx>
Date:   Tue Aug 7 18:56:24 2018 +0000

    Adjust test expectation for the different exception rising from Size
---
 test/unit/client/cell.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/unit/client/cell.py b/test/unit/client/cell.py
index 278e0b4c..a6ddf3ea 100644
--- a/test/unit/client/cell.py
+++ b/test/unit/client/cell.py
@@ -5,7 +5,6 @@ Unit tests for the stem.client.cell.
 import datetime
 import hashlib
 import os
-import struct
 import unittest
 
 from stem.client.datatype import ZERO, CertType, CloseReason, Address, Certificate
@@ -205,7 +204,8 @@ class TestCell(unittest.TestCase):
     self.assertEqual(cell, cell_2)
 
     # pack not possible, but easily callable
-    self.assertRaises(struct.error, cell.pack, even_more_arbitrary_link_protocol)
+    # lots of things cause a ValueError, so this check isn't very specific, but the wording comes from Size and so isn't under the purview of this unit
+    self.assertRaises(ValueError, cell.pack, even_more_arbitrary_link_protocol)
 
     # check other values and inequality
     for (circ_id, payload) in ((arbitrary_circ_id, ZERO * FIXED_PAYLOAD_LEN), (arbitrary_circ_id + 1, RANDOM_PAYLOAD)):



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