Turkesh Patel (openERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-for-caribou-tpa into 
lp:~openerp-dev/openobject-server/trunk-for-caribou-jam.

Requested reviews:
  Jigar Amin  (OpenERP) (jam-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-for-caribou-tpa/+merge/118702

[IMP] unlink data wich are created in test for test_ir_sequence.py.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-for-caribou-tpa/+merge/118702
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-for-caribou-jam.
=== modified file 'openerp/tests/test_ir_sequence.py'
--- openerp/tests/test_ir_sequence.py	2012-06-20 11:51:42 +0000
+++ openerp/tests/test_ir_sequence.py	2012-08-08 10:06:12 +0000
@@ -66,6 +66,15 @@
         cr0.close()
         cr1.close()
 
+    def test_ir_sequence_unlink(self):
+        cr = cursor()
+        ids = registry('ir.sequence').search(cr, ADMIN_USER_ID,[('code', '=', 'test_sequence_type')], {})
+        registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID,[('code', '=', 'test_sequence_type')], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
+        cr.commit()
+        cr.close()
+
 class test_ir_sequence_no_gap(unittest2.TestCase):
     """ Copy of the previous tests for a 'No gap' sequence. """
 
@@ -105,6 +114,15 @@
         cr0.close()
         cr1.close()
 
+    def test_ir_sequence_no_gap_unlink(self):
+        cr = cursor()
+        ids = registry('ir.sequence').search(cr, ADMIN_USER_ID, [('code', '=', 'test_sequence_type_2')], {})
+        registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID, [('code', '=', 'test_sequence_type_2')], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
+        cr.commit()
+        cr.close()
+
 class test_ir_sequence_change_implementation(unittest2.TestCase):
     """ Create sequence objects and change their ``implementation`` field. """
 
@@ -143,6 +161,9 @@
         ids = registry('ir.sequence').search(cr, ADMIN_USER_ID,
             [('code', 'in', ['test_sequence_type_3', 'test_sequence_type_4'])], {})
         registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID,
+            [('code', 'in', ['test_sequence_type_3', 'test_sequence_type_4'])], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
         cr.commit()
         cr.close()
 
@@ -184,7 +205,15 @@
         assert all(str(x) == f() for x in xrange(1,1000))
         cr.commit()
         cr.close()
-        
+    
+    def test_ir_sequence_unlink(self):
+        cr = cursor()
+        ids = registry('ir.sequence').search(cr, ADMIN_USER_ID, [('code', 'in', ['test_sequence_type_5', 'test_sequence_type_6'])], {})
+        registry('ir.sequence').unlink(cr, ADMIN_USER_ID, ids, {})
+        ids = registry('ir.sequence.type').search(cr, ADMIN_USER_ID, [('code', 'in', ['test_sequence_type_5', 'test_sequence_type_6'])], {})
+        registry('ir.sequence.type').unlink(cr, ADMIN_USER_ID, ids, {})
+        cr.commit()
+        cr.close()
 
 
 if __name__ == '__main__':

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to