28 |
28 |
29 def test_supervision(self): |
29 def test_supervision(self): |
30 # do some modification |
30 # do some modification |
31 user = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G ' |
31 user = self.execute('INSERT CWUser X: X login "toto", X upassword "sosafe", X in_group G ' |
32 'WHERE G name "users"').get_entity(0, 0) |
32 'WHERE G name "users"').get_entity(0, 0) |
33 self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': user.eid}, 'x') |
33 self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': user.eid}) |
34 self.execute('DELETE Card B WHERE B title "une news !"') |
34 self.execute('DELETE Card B WHERE B title "une news !"') |
35 self.execute('SET X bookmarked_by U WHERE X is Bookmark, U eid %(x)s', {'x': user.eid}, 'x') |
35 self.execute('SET X bookmarked_by U WHERE X is Bookmark, U eid %(x)s', {'x': user.eid}) |
36 self.execute('SET X content "duh?" WHERE X is Comment') |
36 self.execute('SET X content "duh?" WHERE X is Comment') |
37 self.execute('DELETE X comments Y WHERE Y is Card, Y title "une autre news !"') |
37 self.execute('DELETE X comments Y WHERE Y is Card, Y title "une autre news !"') |
38 # check only one supervision email operation |
38 # check only one supervision email operation |
39 session = self.session |
39 session = self.session |
40 sentops = [op for op in session.pending_operations |
40 sentops = [op for op in session.pending_operations |
89 data) |
89 data) |
90 |
90 |
91 def test_nonregr1(self): |
91 def test_nonregr1(self): |
92 session = self.session |
92 session = self.session |
93 # do some unlogged modification |
93 # do some unlogged modification |
94 self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': session.user.eid}, 'x') |
94 self.execute('SET X last_login_time NOW WHERE X eid %(x)s', {'x': session.user.eid}) |
95 self.commit() # no crash |
95 self.commit() # no crash |
96 |
96 |
97 |
97 |
98 if __name__ == '__main__': |
98 if __name__ == '__main__': |
99 unittest_main() |
99 unittest_main() |