From cdbd34460a3e632f8d64cd2c9bd91be89514be4f Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Mon, 11 Mar 2013 23:10:29 +0200 Subject: [PATCH] Fix an import issue after the last cleanup. - Fix an issue with an import that changed in the last cleanup effort (as a side note, the plugins manager test is a good one to use to check for import regressions). - Clean up some test comments. --- openlp/plugins/songs/lib/__init__.py | 2 ++ .../interfaces/openlp_core_lib/test_pluginmanager.py | 2 +- .../openlp_plugins_songs_forms/test_authorsform.py | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/openlp/plugins/songs/lib/__init__.py b/openlp/plugins/songs/lib/__init__.py index 070d322b1..5c1485b9e 100644 --- a/openlp/plugins/songs/lib/__init__.py +++ b/openlp/plugins/songs/lib/__init__.py @@ -386,6 +386,8 @@ def clean_song(manager, song): ``song`` The song object. """ + from xml import SongXML + if isinstance(song.title, buffer): song.title = unicode(song.title) if isinstance(song.alternate_title, buffer): diff --git a/tests/interfaces/openlp_core_lib/test_pluginmanager.py b/tests/interfaces/openlp_core_lib/test_pluginmanager.py index 6a046c80c..32493ae12 100644 --- a/tests/interfaces/openlp_core_lib/test_pluginmanager.py +++ b/tests/interfaces/openlp_core_lib/test_pluginmanager.py @@ -42,7 +42,7 @@ class TestPluginManager(TestCase): def find_plugins_test(self): """ - Test the find_plugins() method to ensure it imports the correct plugins. + Test the find_plugins() method to ensure it imports the correct plugins """ # GIVEN: A plugin manager plugin_manager = PluginManager() diff --git a/tests/interfaces/openlp_plugins_songs_forms/test_authorsform.py b/tests/interfaces/openlp_plugins_songs_forms/test_authorsform.py index 5d48c4de3..48141ce24 100644 --- a/tests/interfaces/openlp_plugins_songs_forms/test_authorsform.py +++ b/tests/interfaces/openlp_plugins_songs_forms/test_authorsform.py @@ -39,7 +39,7 @@ class TestAuthorsForm(TestCase): def get_first_name_property_test(self): """ - Test that getting the first name property on the AuthorForm works correctly. + Test that getting the first name property on the AuthorForm works correctly """ # GIVEN: A first name to set first_name = u'John' @@ -52,7 +52,7 @@ class TestAuthorsForm(TestCase): def set_first_name_property_test(self): """ - Test that setting the first name property on the AuthorForm works correctly. + Test that setting the first name property on the AuthorForm works correctly """ # GIVEN: A first name to set first_name = u'James' @@ -65,7 +65,7 @@ class TestAuthorsForm(TestCase): def get_last_name_property_test(self): """ - Test that getting the last name property on the AuthorForm works correctly. + Test that getting the last name property on the AuthorForm works correctly """ # GIVEN: A last name to set last_name = u'Smith' @@ -78,7 +78,7 @@ class TestAuthorsForm(TestCase): def set_last_name_property_test(self): """ - Test that setting the last name property on the AuthorForm works correctly. + Test that setting the last name property on the AuthorForm works correctly """ # GIVEN: A last name to set last_name = u'Potter' @@ -91,7 +91,7 @@ class TestAuthorsForm(TestCase): def get_display_name_property_test(self): """ - Test that getting the display name property on the AuthorForm works correctly. + Test that getting the display name property on the AuthorForm works correctly """ # GIVEN: A display name to set display_name = u'John' @@ -104,7 +104,7 @@ class TestAuthorsForm(TestCase): def set_display_name_property_test(self): """ - Test that setting the display name property on the AuthorForm works correctly. + Test that setting the display name property on the AuthorForm works correctly """ # GIVEN: A display name to set display_name = u'John'