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

bzr-revno: 2156
This commit is contained in:
Raoul Snyman 2013-01-23 19:50:53 +00:00 committed by Tim Bentley
commit fcec9cecad
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ class TestLib(TestCase):
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)