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

[tor-commits] [stem/master] Fix recent regression in unit tests



commit a2300bebe0e59c3466ecdbb5e72d37d9faca744a
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Thu Apr 12 18:01:50 2018 -0700

    Fix recent regression in unit tests
    
    Oops, change earlier today broke our mock...
    
      ======================================================================
      FAIL: test_compression_gzip
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/usr/local/lib/python2.7/dist-packages/mock/mock.py", line 1305, in patched
          return func(*args, **keywargs)
        File "/home/atagar/Desktop/stem/test/unit/descriptor/remote.py", line 181, in test_compression_gzip
          self.assertEqual(1, len(descriptors))
            AssertionError: 1 != 0
---
 test/unit/descriptor/remote.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/unit/descriptor/remote.py b/test/unit/descriptor/remote.py
index cc4c3997..1dfccc09 100644
--- a/test/unit/descriptor/remote.py
+++ b/test/unit/descriptor/remote.py
@@ -115,7 +115,7 @@ FALLBACK_ENTRY = b"""\
 def _urlopen_mock(data, encoding = 'identity'):
   urlopen_mock = Mock()
   urlopen_mock().read.return_value = data
-  urlopen_mock().info().getheader.return_value = encoding
+  urlopen_mock().info().get.return_value = encoding
   return urlopen_mock
 
 

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