'test whether the read method returns the right number_next value
(from postgreSQL sequence and not ir_sequence value)'

def test_00(self):

    seq = self.env['ir.sequence'].create({'number_next': 1, 'company_id': 1, 'padding': 4, 'number_increment': 1, 'implementation': 'standard', 'name': 'test-sequence-00'})
    seq.next_by_id()
    seq.next_by_id()
    seq.next_by_id()
    n = seq.next_by_id()
    self.assertEqual(n, '0004', ('The    actual    sequence    value    must    be    4.    reading    :    %s' % n))
    seq.write({'number_next': 1})
    n = seq.next_by_id()
    self.assertEqual(n, '0001', ('The    actual    sequence    value    must    be    1.    reading    :    %s' % n))
