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

[tor-commits] [stem/master] Python 2.6 doesn't support assertIsNotNone()



commit a920e5cfc2e3d0283bdb467a9a78bd281b8ee2a2
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Apr 3 08:33:40 2013 -0700

    Python 2.6 doesn't support assertIsNotNone()
    
    The controller integ tests included a couple assertIsNotNone() calls, which
    wasn't added until python 2.7. Caught and fixed by Desoxy - thanks!
    
    https://trac.torproject.org/8629
---
 test/integ/control/controller.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index d94bcd9..3cf09d9 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -650,9 +650,9 @@ class TestController(unittest.TestCase):
       circuit_id = controller.extend_circuit('0')
 
       # check if our circuit was created
-      self.assertIsNotNone(controller.get_circuit(circuit_id, None))
+      self.assertNotEqual(None, controller.get_circuit(circuit_id, None))
       circuit_id = controller.new_circuit()
-      self.assertIsNotNone(controller.get_circuit(circuit_id, None))
+      self.assertNotEqual(None, controller.get_circuit(circuit_id, None))
 
       self.assertRaises(stem.InvalidRequest, controller.extend_circuit, "foo")
       self.assertRaises(stem.InvalidRequest, controller.extend_circuit, '0', "thisroutershouldntexistbecausestemexists!@##$%#")

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