sobjects/test/unittest_supervising.py
branchstable
changeset 4842 3653e09024a1
parent 4252 6c4f109c2b03
child 5174 78438ad513ca
child 5421 8167de96c523
--- a/sobjects/test/unittest_supervising.py	Tue Mar 09 10:59:44 2010 +0100
+++ b/sobjects/test/unittest_supervising.py	Tue Mar 09 10:59:50 2010 +0100
@@ -27,7 +27,6 @@
 
 
     def test_supervision(self):
-        session = self.session
         # do some modification
         user = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G '
                             'WHERE G name "users"').get_entity(0, 0)
@@ -37,6 +36,7 @@
         self.execute('SET X content "duh?" WHERE X is Comment')
         self.execute('DELETE X comments Y WHERE Y is Card, Y title "une autre news !"')
         # check only one supervision email operation
+        session = self.session
         sentops = [op for op in session.pending_operations
                    if isinstance(op, SupervisionMailOp)]
         self.assertEquals(len(sentops), 1)