From ca3e32c2948a6480a4774ca82d54a0688b494086 Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 14 Sep 2013 22:43:46 +0100 Subject: [PATCH] Fix for py3 --- tests/functional/openlp_plugins/songs/songfileimporthelper.py | 2 +- .../functional/openlp_plugins/songs/test_songshowplusimport.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/openlp_plugins/songs/songfileimporthelper.py b/tests/functional/openlp_plugins/songs/songfileimporthelper.py index d40f14154..5ea907651 100644 --- a/tests/functional/openlp_plugins/songs/songfileimporthelper.py +++ b/tests/functional/openlp_plugins/songs/songfileimporthelper.py @@ -53,7 +53,7 @@ class SongImportTestHelper(TestCase): A method to load and return an object containing the song data from an external file. """ result_file = open(file_name, 'rb') - return json.loads(result_file.read()) + return json.loads(result_file.read().decode()) def file_import(self, source_file_name, result_data): """ diff --git a/tests/functional/openlp_plugins/songs/test_songshowplusimport.py b/tests/functional/openlp_plugins/songs/test_songshowplusimport.py index 5b5062823..7f252018b 100644 --- a/tests/functional/openlp_plugins/songs/test_songshowplusimport.py +++ b/tests/functional/openlp_plugins/songs/test_songshowplusimport.py @@ -63,7 +63,7 @@ class TestSongShowPlusImport(TestCase): # THEN: doImport should return none and the progress bar maximum should not be set. self.assertIsNone(importer.doImport(), 'doImport should return None when import_source is not a list') self.assertEquals(mocked_import_wizard.progress_bar.setMaximum.called, False, - 'setMaxium on import_wizard.progress_bar should not have been called') + 'setMaximum on import_wizard.progress_bar should not have been called') def valid_import_source_test(self): """