server-ux/multi_step_wizard/tests/test_multi_step_wizard.py

24 lines
784 B
Python
Raw Permalink Normal View History

2021-04-28 15:44:37 +00:00
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from flectra.tests.common import tagged
from .common import CommonTestMultiStepWizard
@tagged("post_install", "-at_install")
class TestMultiStepWizard(CommonTestMultiStepWizard):
def setUp(self):
super().setUp()
self.MultiStepWizard = self.env["multi.step.wizard.test"]
def test_behavior(self):
wizard = self.MultiStepWizard.create({})
wizard.open_next()
self.assertEqual(wizard.state, "final")
with self.assertRaises(NotImplementedError):
wizard.open_next()
self.assertTrue(wizard.allow_back)
wizard.open_previous()
self.assertEqual(wizard.state, "start")