[FIX] test_ir_sequence: reduce the number of call to next() (to reduce test time).
bzr revid: vmt@openerp.com-20120903145929-p4kp6eotkcflletk
This commit is contained in:
parent
4498663baf
commit
f3742f0558
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
|
|
|
@ -186,7 +186,7 @@ class test_ir_sequence_generate(unittest2.TestCase):
|
|||
|
||||
cr = cursor()
|
||||
f = lambda *a: registry('ir.sequence').next_by_code(cr, ADMIN_USER_ID, 'test_sequence_type_5', {})
|
||||
assert all(str(x) == f() for x in xrange(1,1000))
|
||||
assert all(str(x) == f() for x in xrange(1,10))
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
||||
|
@ -204,7 +204,7 @@ class test_ir_sequence_generate(unittest2.TestCase):
|
|||
|
||||
cr = cursor()
|
||||
f = lambda *a: registry('ir.sequence').next_by_code(cr, ADMIN_USER_ID, 'test_sequence_type_6', {})
|
||||
assert all(str(x) == f() for x in xrange(1,1000))
|
||||
assert all(str(x) == f() for x in xrange(1,10))
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue