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

[tor-commits] [stem/master] Resetting system call mocking after test



commit e17bfdd0c44b004468bd3121fd5408e2a29074fc
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Nov 21 07:51:00 2011 -0800

    Resetting system call mocking after test
    
    The protocolinfo test mocked system calls but didn't reset the mock when it was
    done. This didn't cause any errors but that was only luck (the system unit
    tests probably ran afterward and cleared the mock when it was done). Oops, this
    is gonna be an easy testing bug to introduce... :/
---
 test/unit/connection/protocolinfo.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/test/unit/connection/protocolinfo.py b/test/unit/connection/protocolinfo.py
index b9dcbb8..fc9ab64 100644
--- a/test/unit/connection/protocolinfo.py
+++ b/test/unit/connection/protocolinfo.py
@@ -178,4 +178,7 @@ class TestProtocolInfoResponse(unittest.TestCase):
     control_message = stem.types.read_message(StringIO.StringIO(RELATIVE_COOKIE_PATH))
     stem.connection.ProtocolInfoResponse.convert(control_message)
     self.assertEquals("./tor-browser_en-US/Data/control_auth_cookie", control_message.cookie_file)
+    
+    # reset system call mocking
+    stem.util.system.CALL_MOCKING = None
 



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