Changeset 14ec91c5 in sasview for src/sas/qtgui/MainWindow


Ignore:
Timestamp:
Feb 2, 2018 9:21:48 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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
Message:

More code review related fixes

Location:
src/sas/qtgui/MainWindow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/GuiManager.py

    r676f137 r14ec91c5  
    99from PyQt5.QtGui import * 
    1010from PyQt5.QtCore import Qt, QLocale, QUrl 
    11 from PyQt5.QtWebKitWidgets import QWebView 
    1211 
    1312from twisted.internet import reactor 
  • src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py

    r8353d90 r14ec91c5  
    272272    #### HELP #### 
    273273    # test when PyQt5 works with html 
    274     def notestActionDocumentation(self): 
     274    def testActionDocumentation(self): 
    275275        """ 
    276276        Menu Help/Documentation 
    277277        """ 
    278         #Mock the QWebView method 
    279         QWebView.show = MagicMock() 
    280  
    281         # Assure the filename is correct 
    282         self.assertIn("index.html", self.manager._helpLocation) 
     278        webbrowser.open = MagicMock() 
    283279 
    284280        # Invoke the action 
    285281        self.manager.actionDocumentation() 
    286282 
    287         # Check if show() got called 
    288         self.assertTrue(QWebView.show.called) 
     283        # see that webbrowser open was attempted 
     284        webbrowser.open.assert_called_once() 
     285 
    289286 
    290287    def skip_testActionTutorial(self): 
Note: See TracChangeset for help on using the changeset viewer.