openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #24246
[Merge] lp:~sam92/openlp/bug-1369139 into lp:openlp
Samuel Mehrbrodt has proposed merging lp:~sam92/openlp/bug-1369139 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1369139 in OpenLP: "Search for authors broken"
https://bugs.launchpad.net/openlp/+bug/1369139
For more details, see:
https://code.launchpad.net/~sam92/openlp/bug-1369139/+merge/234582
Fix author->songs relation
Regression since rev. 2371
lp:~sam92/openlp/bug-1369139 (revision 2420)
[SUCCESS] http://ci.openlp.org/job/Branch-01-Pull/608/
[SUCCESS] http://ci.openlp.org/job/Branch-02-Functional-Tests/557/
[SUCCESS] http://ci.openlp.org/job/Branch-03-Interface-Tests/501/
[SUCCESS] http://ci.openlp.org/job/Branch-04a-Windows_Functional_Tests/460/
[SUCCESS] http://ci.openlp.org/job/Branch-04b-Windows_Interface_Tests/72/
[SUCCESS] http://ci.openlp.org/job/Branch-05a-Code_Analysis/287/
[SUCCESS] http://ci.openlp.org/job/Branch-05b-Test_Coverage/161/
--
https://code.launchpad.net/~sam92/openlp/bug-1369139/+merge/234582
Your team OpenLP Core is requested to review the proposed merge of lp:~sam92/openlp/bug-1369139 into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/db.py'
--- openlp/plugins/songs/lib/db.py 2014-07-05 20:04:17 +0000
+++ openlp/plugins/songs/lib/db.py 2014-09-13 22:06:00 +0000
@@ -31,8 +31,6 @@
the Songs plugin
"""
-import re
-
from sqlalchemy import Column, ForeignKey, Table, types
from sqlalchemy.orm import mapper, relation, reconstructor
from sqlalchemy.sql.expression import func, text
@@ -329,7 +327,9 @@
Column('topic_id', types.Integer(), ForeignKey('topics.id'), primary_key=True)
)
- mapper(Author, authors_table)
+ mapper(Author, authors_table, properties={
+ 'songs': relation(Song, secondary=authors_songs_table, viewonly=True)
+ })
mapper(AuthorSong, authors_songs_table, properties={
'author': relation(Author)
})
=== modified file 'tests/functional/openlp_core_lib/test_ui.py'
--- tests/functional/openlp_core_lib/test_ui.py 2014-06-08 14:27:03 +0000
+++ tests/functional/openlp_core_lib/test_ui.py 2014-09-13 22:06:00 +0000
@@ -154,6 +154,34 @@
self.assertEqual('my tooltip', action.toolTip())
self.assertEqual('my statustip', action.statusTip())
+ def test_create_action_2(self):
+ """
+ Test creating an action
+ """
+ # GIVEN: A dialog
+ dialog = QtGui.QDialog()
+
+ # WHEN: We create an action with some properties
+ action = create_action(dialog, 'my_action', checked=True, enabled=False, visible=False)
+
+ # THEN: These properties should be set
+ self.assertTrue(action.isChecked())
+ self.assertFalse(action.isEnabled())
+ self.assertFalse(action.isVisible())
+
+ def test_create_action_separator(self):
+ """
+ Test creating an action as separator
+ """
+ # GIVEN: A dialog
+ dialog = QtGui.QDialog()
+
+ # WHEN: We create an action as a separator
+ action = create_action(dialog, 'my_action', separator=True)
+
+ # THEN: The action should be a separator
+ self.assertTrue(action.isSeparator())
+
def test_create_checked_enabled_visible_action(self):
"""
Test creating an action with the 'checked', 'enabled' and 'visible' properties.
Follow ups