示例#1
0
def test_storeConfig_2(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    app.app.config['keypadW'] = {}
    suc = app.storeConfig()
    assert suc
示例#2
0
def test_initConfig_3(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    app.app.config['keypadW'] = {'winPosY': 10000}
    suc = app.initConfig()
    assert suc
示例#3
0
def test_storeConfig_1(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    if 'keypadW' in app.app.config:
        del app.app.config['keypadW']
    suc = app.storeConfig()
    assert suc
示例#4
0
def test_loadFinished_1(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    app.loadFinished()
示例#5
0
def test_closeEvent_1(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    with mock.patch.object(MWidget, 'closeEvent', return_value=True):
        app.closeEvent(QCloseEvent())
示例#6
0
def test_initConfig_1(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    suc = app.initConfig()
    assert suc
示例#7
0
def test_showUrl_2(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    app.host = 'localhost'
    app.showUrl()
示例#8
0
def test_showUrl_1(qtbot):
    app = KeypadWindow(app=Test())
    qtbot.addWidget(app)

    app.showUrl()