Commit bb8474bf authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_computer_immobilisation: Fixup in test

test_apply_model_filled_computer_batch_mode did not pass batch_mode
and was wrongly checking that result is True

Test was passing, because without batch_mode Computer_applyComputerModel
returns Base_redirect, so the result is indeed evaluated as True.
Yet in this case we should expect False, since no changes are applied
parent 5d3fca41
...@@ -56,10 +56,10 @@ class TestComputerWithComputerModel(ERP5TypeTestCase): ...@@ -56,10 +56,10 @@ class TestComputerWithComputerModel(ERP5TypeTestCase):
group=computer_category_list) group=computer_category_list)
self.assertEqual(computer.getPropertyList('group'), self.assertEqual(computer.getPropertyList('group'),
computer_category_list) computer_category_list)
result = computer.Computer_applyComputerModel() result = computer.Computer_applyComputerModel(batch_mode=1)
self.assertEqual(computer.getPropertyList('group'), self.assertEqual(computer.getPropertyList('group'),
computer_category_list) computer_category_list)
self.assertTrue(result) self.assertFalse(result)
def test_apply_model_filled_computer_forced(self): def test_apply_model_filled_computer_forced(self):
computer_category_list = ['oink'] computer_category_list = ['oink']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment