@@ -100,16 +100,7 @@ def test_wizard_configuration(self):
100100 self .assertTrue (len (created_line ) == 1 ,
101101 "Wizard did not create an order line" )
102102
103- def test_reconfiguration (self ):
104- """Test reconfiguration functionality of the wizard"""
105- self .test_wizard_configuration ()
106-
107- existing_lines = self .so .order_line
108-
109- order_line = self .so .order_line .filtered (
110- lambda l : l .product_id .config_ok
111- )
112-
103+ def do_reconfigure (self , order_line ):
113104 reconfig_action = order_line .reconfigure_product ()
114105
115106 wizard = self .env ['product.configurator' ].browse (
@@ -123,6 +114,18 @@ def test_reconfiguration(self):
123114 while wizard .action_next_step ():
124115 pass
125116
117+ def test_reconfiguration (self ):
118+ """Test reconfiguration functionality of the wizard"""
119+ self .test_wizard_configuration ()
120+
121+ existing_lines = self .so .order_line
122+
123+ order_line = self .so .order_line .filtered (
124+ lambda l : l .product_id .config_ok
125+ )
126+
127+ self .do_reconfigure (order_line )
128+
126129 config_variants = self .env ['product.product' ].search ([
127130 ('config_ok' , '=' , True )
128131 ])
@@ -136,12 +139,7 @@ def test_reconfiguration(self):
136139
137140 # test that running through again with the same values does not
138141 # create another variant
139- attr_vals = self .get_attr_values (['diesel' , '220d' ])
140- self .wizard_write_proceed (wizard , attr_vals )
141-
142- # Cycle through steps until wizard ends
143- while wizard .action_next_step ():
144- pass
142+ self .do_reconfigure (order_line )
145143
146144 config_variants = self .env ['product.product' ].search ([
147145 ('config_ok' , '=' , True )
0 commit comments