Commit c0ac5f74 authored by Jérome Perrin's avatar Jérome Perrin

testERP5TestNode: undo patch in try/finally

otherwise it's not executed when test has an error.

We should consider using mock library here.
parent 38731317
...@@ -1126,9 +1126,11 @@ shared = true ...@@ -1126,9 +1126,11 @@ shared = true
RunnerClass.getDictionaryFromFile = patch_getDictionaryFromFile RunnerClass.getDictionaryFromFile = patch_getDictionaryFromFile
RunnerClass._createInstance = doNothing RunnerClass._createInstance = doNothing
RunnerClass._waitInstanceCreation = doNothing RunnerClass._waitInstanceCreation = doNothing
try:
# Run # Run
test_node = self.getTestNode() test_node = self.getTestNode()
test_node.run() test_node.run()
finally:
# Restore methods # Restore methods
TaskDistributor.getSlaposAccountKey = original_getSlaposAccountKey TaskDistributor.getSlaposAccountKey = original_getSlaposAccountKey
TaskDistributor.getSlaposAccountCertificate = original_getSlaposAccountCertificate TaskDistributor.getSlaposAccountCertificate = original_getSlaposAccountCertificate
......
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