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

Proposed by Raoul Snyman
Status: Merged
Merged at revision: 2156
Proposed branch: lp:~raoul-snyman/openlp/tests
Merge into: lp:openlp
Diff against target: 12 lines (+1/-1)
1 file modified
tests/functional/openlp_core_lib/test_lib.py (+1/-1)
To merge this branch: bzr merge lp:~raoul-snyman/openlp/tests
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+144179@code.launchpad.net

Description of the change

Fix a test that used a more updated version of Mock that what the Jenkins server has.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/functional/openlp_core_lib/test_lib.py'
2--- tests/functional/openlp_core_lib/test_lib.py 2013-01-21 13:57:09 +0000
3+++ tests/functional/openlp_core_lib/test_lib.py 2013-01-21 20:27:22 +0000
4@@ -349,7 +349,7 @@
5 thumb_mocked_stat = MagicMock()
6 thumb_mocked_stat.st_mtime = datetime.now() - timedelta(seconds=10)
7 mocked_os.path.exists.return_value = True
8- mocked_os.stat.side_effect = [file_mocked_stat, thumb_mocked_stat]
9+ mocked_os.stat.side_effect = lambda fname: file_mocked_stat if fname == file_path else thumb_mocked_stat
10
11 # WHEN: we run the validate_thumb() function
12 result = validate_thumb(file_path, thumb_path)