← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/bug1336020 into lp:openlp

 

Phill has proposed merging lp:~phill-ridout/openlp/bug1336020 into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)
Related bugs:
  Bug #1336020 in OpenLP: "Typo's in test_file_dialog.py"
  https://bugs.launchpad.net/openlp/+bug/1336020

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug1336020/+merge/232255

Fixed test in test_file_dialog.py

lp:~phill-ridout/openlp/bug1336020 (revision 2399)
[SUCCESS] http://ci.openlp.org/job/Branch-01-Pull/590/
[SUCCESS] http://ci.openlp.org/job/Branch-02-Functional-Tests/539/
[SUCCESS] http://ci.openlp.org/job/Branch-03-Interface-Tests/483/
[SUCCESS] http://ci.openlp.org/job/Branch-04a-Windows_Functional_Tests/443/
[SUCCESS] http://ci.openlp.org/job/Branch-04b-Windows_Interface_Tests/55/
-- 
https://code.launchpad.net/~phill-ridout/openlp/bug1336020/+merge/232255
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'tests/functional/openlp_core_lib/test_file_dialog.py'
--- tests/functional/openlp_core_lib/test_file_dialog.py	2014-04-20 20:19:21 +0000
+++ tests/functional/openlp_core_lib/test_file_dialog.py	2014-08-26 16:16:22 +0000
@@ -5,7 +5,7 @@
 
 from openlp.core.common import UiStrings
 from openlp.core.lib.filedialog import FileDialog
-from tests.functional import MagicMock, patch
+from tests.functional import MagicMock, call, patch
 
 
 class TestFileDialog(TestCase):
@@ -65,11 +65,9 @@
 
         # THEN: os.path.exists should have been called with known args. QmessageBox.information should have been
         #       called. The returned result should correlate with the input.
-        self.mocked_os.path.exists.assert_callde_with('/Valid File')
-        self.mocked_os.path.exists.assert_callde_with('/url%20encoded%20file%20%231')
-        self.mocked_os.path.exists.assert_callde_with('/url encoded file #1')
-        self.mocked_os.path.exists.assert_callde_with('/non-existing')
-        self.mocked_os.path.exists.assert_callde_with('/non-existing')
+        call_list = [call('/Valid File'), call('/url%20encoded%20file%20%231'), call('/url encoded file #1'),
+                     call('/non-existing'), call('/non-existing')]
+        self.mocked_os.path.exists.assert_has_calls(call_list)
         self.mocked_qt_gui.QmessageBox.information.called_with(self.mocked_parent, UiStrings().FileNotFound,
                                                                UiStrings().FileNotFoundMessage % '/non-existing')
         self.assertEqual(result, ['/Valid File', '/url encoded file #1'], 'The returned file list is incorrect')


Follow ups