← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/tests into lp:openlp

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/tests into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/tests/+merge/144179

Fix a test that used a more updated version of Mock that what the Jenkins server has.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/tests/+merge/144179
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/tests into lp:openlp.
=== modified file 'tests/functional/openlp_core_lib/test_lib.py'
--- tests/functional/openlp_core_lib/test_lib.py	2013-01-21 13:57:09 +0000
+++ tests/functional/openlp_core_lib/test_lib.py	2013-01-21 20:27:22 +0000
@@ -349,7 +349,7 @@
             thumb_mocked_stat = MagicMock()
             thumb_mocked_stat.st_mtime = datetime.now() - timedelta(seconds=10)
             mocked_os.path.exists.return_value = True
-            mocked_os.stat.side_effect = [file_mocked_stat, thumb_mocked_stat]
+            mocked_os.stat.side_effect = lambda fname: file_mocked_stat if fname == file_path else thumb_mocked_stat
                 
             # WHEN: we run the validate_thumb() function
             result = validate_thumb(file_path, thumb_path)


Follow ups