forked from openlp/openlp
Added songbeamer chord import test
This commit is contained in:
parent
5187b7b945
commit
fa9cdc5b94
@ -45,7 +45,7 @@ class TestSongBeamerFileImport(SongImportTestHelper):
|
|||||||
@patch('openlp.plugins.songs.lib.importers.songbeamer.Settings')
|
@patch('openlp.plugins.songs.lib.importers.songbeamer.Settings')
|
||||||
def test_song_import(self, mocked_settings):
|
def test_song_import(self, mocked_settings):
|
||||||
"""
|
"""
|
||||||
Test that loading an OpenSong file works correctly on various files
|
Test that loading an SongBeamer file works correctly on various files
|
||||||
"""
|
"""
|
||||||
# Mock out the settings - always return False
|
# Mock out the settings - always return False
|
||||||
mocked_returned_settings = MagicMock()
|
mocked_returned_settings = MagicMock()
|
||||||
@ -55,6 +55,8 @@ class TestSongBeamerFileImport(SongImportTestHelper):
|
|||||||
self.load_external_result_data(os.path.join(TEST_PATH, 'Amazing Grace.json')))
|
self.load_external_result_data(os.path.join(TEST_PATH, 'Amazing Grace.json')))
|
||||||
self.file_import([os.path.join(TEST_PATH, 'Lobsinget dem Herrn.sng')],
|
self.file_import([os.path.join(TEST_PATH, 'Lobsinget dem Herrn.sng')],
|
||||||
self.load_external_result_data(os.path.join(TEST_PATH, 'Lobsinget dem Herrn.json')))
|
self.load_external_result_data(os.path.join(TEST_PATH, 'Lobsinget dem Herrn.json')))
|
||||||
|
self.file_import([os.path.join(TEST_PATH, 'When I Call On You.sng')],
|
||||||
|
self.load_external_result_data(os.path.join(TEST_PATH, 'When I Call On You.json')))
|
||||||
|
|
||||||
def test_cp1252_encoded_file(self):
|
def test_cp1252_encoded_file(self):
|
||||||
"""
|
"""
|
||||||
|
14
tests/resources/songbeamersongs/When I Call On You.json
Normal file
14
tests/resources/songbeamersongs/When I Call On You.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"title": "When I Call On You",
|
||||||
|
"verse_order_list": [],
|
||||||
|
"verses": [
|
||||||
|
[
|
||||||
|
"[G]When I call on Y[Em]ou,\n[G]You are always [D]there,\n[G]When I call on Y[Em]ou.\n[G]You are always [D]there. [D]\n",
|
||||||
|
"v"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"[G]Oh it [Em]makes me [G]feel like [D]dancing,\n[G]Oh it [Em]makes me [G]feel like [D]dancing,\n[Em]Oh - oh -[D]oh - oh -[G]oh.\n",
|
||||||
|
"v"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
14
tests/resources/songbeamersongs/When I Call On You.sng
Normal file
14
tests/resources/songbeamersongs/When I Call On You.sng
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#LangCount=1
|
||||||
|
#Title=When I Call On You
|
||||||
|
#Chords=MCwwLEcNMTUuNSwwLEVtDTAsMSxHDTE1LDEsRA0wLDIsRw0xNS41LDIsRW0NMCwzLEcNMTUsMyxEDTIzLjUsMyxEDTAsNSxHDTYsNSxFbQ0xNSw1LEcNMjUsNSxEDTAsNixHDTYsNixFbQ0xNSw2LEcNMjUsNixEDTAsNyxFbQ05LDcsRA0xOCw3LEcN
|
||||||
|
#Editor=SongBeamer 4.47
|
||||||
|
#Version=3
|
||||||
|
---
|
||||||
|
When I call on You,
|
||||||
|
You are always there,
|
||||||
|
When I call on You.
|
||||||
|
You are always there.
|
||||||
|
---
|
||||||
|
Oh it makes me feel like dancing,
|
||||||
|
Oh it makes me feel like dancing,
|
||||||
|
Oh - oh -oh - oh -oh.
|
Loading…
Reference in New Issue
Block a user