Changeset 14ec91c5 in sasview for src/sas/qtgui/Plotting
- Timestamp:
- Feb 2, 2018 9:21:48 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- a90c9c5
- Parents:
- 5e66738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py
r53c771e r14ec91c5 1 1 import sys 2 2 import unittest 3 import webbrowser 3 4 from unittest.mock import MagicMock 4 5 … … 72 73 self.widget.show() 73 74 74 #Mock the QWebView method 75 QtWebKit.QWebView.show = MagicMock() 76 QtWebKit.QWebView.load = MagicMock() 75 #Mock the webbrowser.open method 76 webbrowser.open = MagicMock() 77 77 78 78 # Invoke the action … … 80 80 81 81 # Check if show() got called 82 self.assertTrue( QtWebKit.QWebView.show.called)82 self.assertTrue(webbrowser.open.called) 83 83 84 84 # Assure the filename is correct 85 self.assertIn("graph_help.html", QtWebKit.QWebView.load.call_args[0][0].toString())85 self.assertIn("graph_help.html", webbrowser.open.call_args[0][0]) 86 86 87 87 def testSetModel(self):
Note: See TracChangeset
for help on using the changeset viewer.