mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-15 02:32:06 +00:00
24 lines
784 B
Python
24 lines
784 B
Python
|
# 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")
|