~tomasgroth/openlp/portable-path

« back to all changes in this revision

Viewing changes to tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py

  • Committer: Tomas Groth
  • Date: 2019-04-30 19:02:42 UTC
  • mfrom: (2829.2.32 openlp)
  • Revision ID: tomasgroth@yahoo.dk-20190430190242-6zwjk8724tyux70m
trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2018 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2019 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
23
23
Package to test the openlp.plugins.songs.forms.songmaintenanceform package.
24
24
"""
25
25
from unittest import TestCase
26
 
from unittest.mock import MagicMock, patch, call
 
26
from unittest.mock import MagicMock, call, patch
27
27
 
28
28
from PyQt5 import QtCore, QtWidgets
29
29
 
236
236
        assert MockedQListWidgetItem.call_args_list == expected_widget_item_calls, MockedQListWidgetItem.call_args_list
237
237
        mocked_author_item1.setData.assert_called_once_with(QtCore.Qt.UserRole, 2)
238
238
        mocked_author_item2.setData.assert_called_once_with(QtCore.Qt.UserRole, 1)
239
 
        mocked_authors_list_widget.addItem.call_args_list == [
240
 
            call(mocked_author_item1), call(mocked_author_item2)]
 
239
        mocked_authors_list_widget.addItem.assert_has_calls([
 
240
            call(mocked_author_item1), call(mocked_author_item2)])
241
241
 
242
242
    @patch('openlp.plugins.songs.forms.songmaintenanceform.QtWidgets.QListWidgetItem')
243
243
    @patch('openlp.plugins.songs.forms.songmaintenanceform.Topic')