'Test draft mode nesting.'

@mute_logger('odoo.models')
def test_55_draft(self):

    env = self.env
    self.assertFalse(env.in_draft)
    with env.do_in_draft():
        self.assertTrue(env.in_draft)
        with env.do_in_draft():
            self.assertTrue(env.in_draft)
            with env.do_in_draft():
                self.assertTrue(env.in_draft)
            self.assertTrue(env.in_draft)
        self.assertTrue(env.in_draft)
    self.assertFalse(env.in_draft)
