Comment 2 for bug 476418

Revision history for this message
Jamu Kakar (jkakar) wrote :

[1]

+ def makePersistFile(self, *args, **kwargs):
+ """Return a temporary filename to be usued by a L{Persist} object.

s/usued/used/

[2]

+ The possible .old persist file is cleaned up after the test..

s/.././

[3]

[ERROR]: landscape.manager.tests.test_scriptexecution.RunScriptTests.test_restore_umask_in_event_of_error

Traceback (most recent call last):
  File "/home/jkakar/src/free/landscape-client/cleanup-test-files/landscape/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/jkakar/src/free/landscape-client/cleanup-test-files/landscape/manager/tests/test_scriptexecution.py", line 138, in test_restore_umask_in_event_of_error
    self.assertFalse(os.path.exists(filename))
exceptions.NameError: global name 'filename' is not defined

[4]

             return result.addBoth(
- self._remove_script, filename, attachment_dir, old_umask)
+ remove_script_cb, filename, attachment_dir, old_umask)
         except:
- os.umask(old_umask)
+ self._remove_script(filename, None, old_umask)
             raise

Thomas already mentioned it, but just to capture it, the duplication
here should be removed.

+1 if all the tests pass. :)