Пример #1
0
def test_show_login_error():
    """
    Ensures that an error message is displayed in the login dialog.
    """
    mock_controller = mock.MagicMock()
    w = Window()
    w.setup(mock_controller)
    w.login_dialog = mock.MagicMock()
    w.show_login_error('boom')
    w.login_dialog.error.assert_called_once_with('boom')
Пример #2
0
def test_show_login_error(mocker):
    """
    Ensures that an error message is displayed in the login dialog.
    """
    w = Window()
    w.show_login = mocker.MagicMock()
    w.setup(mocker.MagicMock())
    w.login_dialog = mocker.MagicMock()

    w.show_login_error("boom")

    w.login_dialog.error.assert_called_once_with("boom")