Merge lp:~phill-ridout/openlp/moar_test_cleanups into lp:openlp

Proposed by Phill
Status: Merged
Merged at revision: 2803
Proposed branch: lp:~phill-ridout/openlp/moar_test_cleanups
Merge into: lp:openlp
Diff against target: 477 lines (+45/-45)
24 files modified
tests/functional/openlp_core/ui/test_thememanager.py (+10/-10)
tests/functional/openlp_plugins/presentations/test_impresscontroller.py (+2/-2)
tests/functional/openlp_plugins/presentations/test_pdfcontroller.py (+5/-5)
tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py (+3/-3)
tests/functional/openlp_plugins/songs/test_chordproimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_easyslidesimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_ewimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_lyriximport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_openlyricsimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_opensongimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_opsproimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_powerpraiseimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_propresenterimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_songbeamerimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_songproimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_songselect.py (+1/-1)
tests/functional/openlp_plugins/songs/test_songshowplusimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_sundayplusimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_videopsalm.py (+1/-1)
tests/functional/openlp_plugins/songs/test_wordsofworshipimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_worshipassistantimport.py (+1/-1)
tests/functional/openlp_plugins/songs/test_zionworximport.py (+1/-1)
tests/interfaces/openlp_core/common/test_utils.py (+6/-6)
To merge this branch: bzr merge lp:~phill-ridout/openlp/moar_test_cleanups
Reviewer Review Type Date Requested Status
Tim Bentley Approve
Review via email: mp+335579@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/functional/openlp_core/ui/test_thememanager.py'
2--- tests/functional/openlp_core/ui/test_thememanager.py 2017-12-20 21:18:44 +0000
3+++ tests/functional/openlp_core/ui/test_thememanager.py 2017-12-24 09:31:18 +0000
4@@ -34,7 +34,7 @@
5 from openlp.core.common.path import Path
6 from openlp.core.ui import ThemeManager
7
8-from tests.utils.constants import TEST_RESOURCES_PATH
9+from tests.utils.constants import RESOURCE_PATH
10
11
12 class TestThemeManager(TestCase):
13@@ -60,7 +60,7 @@
14 """
15 # GIVEN: A new ThemeManager instance.
16 theme_manager = ThemeManager()
17- theme_manager.theme_path = Path(TEST_RESOURCES_PATH, 'themes')
18+ theme_manager.theme_path = RESOURCE_PATH / 'themes'
19 mocked_zipfile_init.return_value = None
20
21 # WHEN: The theme is exported
22@@ -68,7 +68,7 @@
23
24 # THEN: The zipfile should be created at the given path
25 mocked_zipfile_init.assert_called_with(os.path.join('some', 'path', 'Default.otz'), 'w')
26- mocked_zipfile_write.assert_called_with(os.path.join(TEST_RESOURCES_PATH, 'themes', 'Default', 'Default.xml'),
27+ mocked_zipfile_write.assert_called_with(str(RESOURCE_PATH / 'themes' / 'Default' / 'Default.xml'),
28 os.path.join('Default', 'Default.xml'))
29
30 def test_initial_theme_manager(self):
31@@ -100,8 +100,8 @@
32 mocked_theme.extract_formatted_xml.return_value = 'fake_theme_xml'.encode()
33
34 # WHEN: Calling _write_theme with path to the same image, but the path written slightly different
35- file_name1 = Path(TEST_RESOURCES_PATH, 'church.jpg')
36- theme_manager._write_theme(mocked_theme, file_name1, file_name1)
37+ file_path_1 = RESOURCE_PATH / 'church.jpg'
38+ theme_manager._write_theme(mocked_theme, file_path_1, file_path_1)
39
40 # THEN: The mocked_copyfile should not have been called
41 assert mocked_copyfile.called is False, 'copyfile should not be called'
42@@ -123,9 +123,9 @@
43 mocked_theme.filename = "filename"
44
45 # WHEN: Calling _write_theme with path to different images
46- file_name1 = Path(TEST_RESOURCES_PATH, 'church.jpg')
47- file_name2 = Path(TEST_RESOURCES_PATH, 'church2.jpg')
48- theme_manager._write_theme(mocked_theme, file_name1, file_name2)
49+ file_path_1 = RESOURCE_PATH / 'church.jpg'
50+ file_path_2 = RESOURCE_PATH / 'church2.jpg'
51+ theme_manager._write_theme(mocked_theme, file_path_1, file_path_2)
52
53 # THEN: The mocked_copyfile should not have been called
54 assert mocked_copyfile.called is True, 'copyfile should be called'
55@@ -200,10 +200,10 @@
56 theme_manager.generate_and_save_image = MagicMock()
57 theme_manager.theme_path = None
58 folder_path = Path(mkdtemp())
59- theme_file = Path(TEST_RESOURCES_PATH, 'themes', 'Moss_on_tree.otz')
60+ theme_file_path = RESOURCE_PATH / 'themes' / 'Moss_on_tree.otz'
61
62 # WHEN: We try to unzip it
63- theme_manager.unzip_theme(theme_file, folder_path)
64+ theme_manager.unzip_theme(theme_file_path, folder_path)
65
66 # THEN: Files should be unpacked
67 assert (folder_path / 'Moss on tree' / 'Moss on tree.xml').exists() is True
68
69=== modified file 'tests/functional/openlp_plugins/presentations/test_impresscontroller.py'
70--- tests/functional/openlp_plugins/presentations/test_impresscontroller.py 2017-12-22 21:04:29 +0000
71+++ tests/functional/openlp_plugins/presentations/test_impresscontroller.py 2017-12-24 09:31:18 +0000
72@@ -32,7 +32,7 @@
73 from openlp.plugins.presentations.lib.impresscontroller import ImpressController, ImpressDocument, TextType
74 from openlp.plugins.presentations.presentationplugin import __default_settings__
75
76-from tests.utils.constants import TEST_RESOURCES_PATH
77+from tests.utils.constants import RESOURCE_PATH
78 from tests.helpers.testmixin import TestMixin
79
80
81@@ -134,7 +134,7 @@
82 mocked_plugin = MagicMock()
83 mocked_plugin.settings_section = 'presentations'
84 Settings().extend_default_settings(__default_settings__)
85- self.file_name = Path(TEST_RESOURCES_PATH, 'presentations', 'test.pptx')
86+ self.file_name = RESOURCE_PATH / 'presentations' / 'test.pptx'
87 self.ppc = ImpressController(mocked_plugin)
88 self.doc = ImpressDocument(self.ppc, self.file_name)
89
90
91=== modified file 'tests/functional/openlp_plugins/presentations/test_pdfcontroller.py'
92--- tests/functional/openlp_plugins/presentations/test_pdfcontroller.py 2017-12-24 07:11:30 +0000
93+++ tests/functional/openlp_plugins/presentations/test_pdfcontroller.py 2017-12-24 09:31:18 +0000
94@@ -35,7 +35,7 @@
95 from openlp.core.common.path import Path
96 from openlp.core.display.screens import ScreenList
97
98-from tests.utils.constants import TEST_RESOURCES_PATH
99+from tests.utils.constants import RESOURCE_PATH
100 from tests.helpers.testmixin import TestMixin
101
102 __default_settings__ = {
103@@ -99,7 +99,7 @@
104 Test loading of a Pdf using the PdfController
105 """
106 # GIVEN: A Pdf-file
107- test_file = Path(TEST_RESOURCES_PATH, 'presentations', 'pdf_test1.pdf')
108+ test_file_path = RESOURCE_PATH / 'presentations' / 'pdf_test1.pdf'
109
110 # WHEN: The Pdf is loaded
111 controller = PdfController(plugin=self.mock_plugin)
112@@ -107,7 +107,7 @@
113 raise SkipTest('Could not detect mudraw or ghostscript, so skipping PDF test')
114 controller.temp_folder = self.temp_folder_path
115 controller.thumbnail_folder = self.thumbnail_folder_path
116- document = PdfDocument(controller, test_file)
117+ document = PdfDocument(controller, test_file_path)
118 loaded = document.load_presentation()
119
120 # THEN: The load should succeed and we should be able to get a pagecount
121@@ -119,7 +119,7 @@
122 Test loading of a Pdf and check size of generate pictures
123 """
124 # GIVEN: A Pdf-file
125- test_file = Path(TEST_RESOURCES_PATH, 'presentations', 'pdf_test1.pdf')
126+ test_file_path = RESOURCE_PATH / 'presentations' / 'pdf_test1.pdf'
127
128 # WHEN: The Pdf is loaded
129 controller = PdfController(plugin=self.mock_plugin)
130@@ -127,7 +127,7 @@
131 raise SkipTest('Could not detect mudraw or ghostscript, so skipping PDF test')
132 controller.temp_folder = self.temp_folder_path
133 controller.thumbnail_folder = self.thumbnail_folder_path
134- document = PdfDocument(controller, test_file)
135+ document = PdfDocument(controller, test_file_path)
136 loaded = document.load_presentation()
137
138 # THEN: The load should succeed and pictures should be created and have been scales to fit the screen
139
140=== modified file 'tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py'
141--- tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py 2017-12-24 07:11:30 +0000
142+++ tests/functional/openlp_plugins/presentations/test_pptviewcontroller.py 2017-12-24 09:31:18 +0000
143@@ -32,7 +32,7 @@
144 from openlp.core.common.path import Path
145
146 from tests.helpers.testmixin import TestMixin
147-from tests.utils.constants import TEST_RESOURCES_PATH
148+from tests.utils.constants import RESOURCE_PATH
149
150
151 class TestPptviewController(TestCase, TestMixin):
152@@ -172,7 +172,7 @@
153 """
154 # GIVEN: mocked PresentationController.save_titles_and_notes and a pptx file
155 doc = PptviewDocument(self.mock_controller, self.mock_presentation)
156- doc.file_path = Path(TEST_RESOURCES_PATH, 'presentations', 'test.pptx')
157+ doc.file_path = RESOURCE_PATH / 'presentations' / 'test.pptx'
158 doc.save_titles_and_notes = MagicMock()
159
160 # WHEN reading the titles and notes
161@@ -216,7 +216,7 @@
162 mocked_is_zf.return_value = False
163 mocked_open.filesize = 10
164 doc = PptviewDocument(self.mock_controller, self.mock_presentation)
165- doc.file_path = Path(TEST_RESOURCES_PATH, 'presentations', 'test.ppt')
166+ doc.file_path = RESOURCE_PATH / 'presentations' / 'test.ppt'
167 doc.save_titles_and_notes = MagicMock()
168
169 # WHEN: reading the titles and notes
170
171=== modified file 'tests/functional/openlp_plugins/songs/test_chordproimport.py'
172--- tests/functional/openlp_plugins/songs/test_chordproimport.py 2017-12-22 21:20:49 +0000
173+++ tests/functional/openlp_plugins/songs/test_chordproimport.py 2017-12-24 09:31:18 +0000
174@@ -27,7 +27,7 @@
175 from tests.helpers.songfileimport import SongImportTestHelper
176 from tests.utils.constants import RESOURCE_PATH
177
178-TEST_PATH = RESOURCE_PATH / 'chordprosongs'
179+TEST_PATH = RESOURCE_PATH / 'songs' / 'chordpro'
180
181
182 class TestChordProFileImport(SongImportTestHelper):
183
184=== modified file 'tests/functional/openlp_plugins/songs/test_easyslidesimport.py'
185--- tests/functional/openlp_plugins/songs/test_easyslidesimport.py 2017-12-22 21:20:49 +0000
186+++ tests/functional/openlp_plugins/songs/test_easyslidesimport.py 2017-12-24 09:31:18 +0000
187@@ -24,7 +24,7 @@
188 from tests.helpers.songfileimport import SongImportTestHelper
189 from tests.utils.constants import RESOURCE_PATH
190
191-TEST_PATH = RESOURCE_PATH / 'easyslidessongs'
192+TEST_PATH = RESOURCE_PATH / 'songs' / 'easyslides'
193
194
195 class TestEasySlidesFileImport(SongImportTestHelper):
196
197=== modified file 'tests/functional/openlp_plugins/songs/test_ewimport.py'
198--- tests/functional/openlp_plugins/songs/test_ewimport.py 2017-12-24 07:40:07 +0000
199+++ tests/functional/openlp_plugins/songs/test_ewimport.py 2017-12-24 09:31:18 +0000
200@@ -31,7 +31,7 @@
201
202 from tests.utils.constants import RESOURCE_PATH
203
204-TEST_PATH = RESOURCE_PATH / 'easyworshipsongs'
205+TEST_PATH = RESOURCE_PATH / 'songs' / 'easyworship'
206 SONG_TEST_DATA = [
207 {'title': 'Amazing Grace',
208 'authors': ['John Newton'],
209
210=== modified file 'tests/functional/openlp_plugins/songs/test_lyriximport.py'
211--- tests/functional/openlp_plugins/songs/test_lyriximport.py 2017-12-22 21:20:49 +0000
212+++ tests/functional/openlp_plugins/songs/test_lyriximport.py 2017-12-24 09:31:18 +0000
213@@ -24,7 +24,7 @@
214 from tests.helpers.songfileimport import SongImportTestHelper
215 from tests.utils.constants import RESOURCE_PATH
216
217-TEST_PATH = RESOURCE_PATH / 'lyrixsongs'
218+TEST_PATH = RESOURCE_PATH / 'songs' / 'lyrix'
219
220
221 class TestLyrixFileImport(SongImportTestHelper):
222
223=== modified file 'tests/functional/openlp_plugins/songs/test_openlyricsimport.py'
224--- tests/functional/openlp_plugins/songs/test_openlyricsimport.py 2017-12-24 07:40:07 +0000
225+++ tests/functional/openlp_plugins/songs/test_openlyricsimport.py 2017-12-24 09:31:18 +0000
226@@ -37,7 +37,7 @@
227 from tests.helpers.testmixin import TestMixin
228 from tests.utils.constants import RESOURCE_PATH
229
230-TEST_PATH = RESOURCE_PATH / 'openlyricssongs'
231+TEST_PATH = RESOURCE_PATH / 'songs' / 'openlyrics'
232 SONG_TEST_DATA = {
233 'What a friend we have in Jesus.xml': {
234 'title': 'What A Friend We Have In Jesus',
235
236=== modified file 'tests/functional/openlp_plugins/songs/test_opensongimport.py'
237--- tests/functional/openlp_plugins/songs/test_opensongimport.py 2017-12-24 07:40:07 +0000
238+++ tests/functional/openlp_plugins/songs/test_opensongimport.py 2017-12-24 09:31:18 +0000
239@@ -31,7 +31,7 @@
240 from tests.helpers.songfileimport import SongImportTestHelper
241 from tests.utils.constants import RESOURCE_PATH
242
243-TEST_PATH = RESOURCE_PATH / 'opensongsongs'
244+TEST_PATH = RESOURCE_PATH / 'songs' / 'opensong'
245
246
247 class TestOpenSongFileImport(SongImportTestHelper):
248
249=== modified file 'tests/functional/openlp_plugins/songs/test_opsproimport.py'
250--- tests/functional/openlp_plugins/songs/test_opsproimport.py 2017-12-24 07:40:07 +0000
251+++ tests/functional/openlp_plugins/songs/test_opsproimport.py 2017-12-24 09:31:18 +0000
252@@ -35,7 +35,7 @@
253 from tests.utils import load_external_result_data
254 from tests.utils.constants import RESOURCE_PATH
255
256-TEST_PATH = RESOURCE_PATH / 'opsprosongs'
257+TEST_PATH = RESOURCE_PATH / 'songs' / 'opspro'
258
259
260 def _get_item(data, key):
261
262=== modified file 'tests/functional/openlp_plugins/songs/test_powerpraiseimport.py'
263--- tests/functional/openlp_plugins/songs/test_powerpraiseimport.py 2017-12-22 22:21:38 +0000
264+++ tests/functional/openlp_plugins/songs/test_powerpraiseimport.py 2017-12-24 09:31:18 +0000
265@@ -26,7 +26,7 @@
266 from tests.helpers.songfileimport import SongImportTestHelper
267 from tests.utils.constants import RESOURCE_PATH
268
269-TEST_PATH = RESOURCE_PATH / 'powerpraisesongs'
270+TEST_PATH = RESOURCE_PATH / 'songs' / 'powerpraise'
271
272
273 class TestPowerPraiseFileImport(SongImportTestHelper):
274
275=== modified file 'tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py'
276--- tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py 2017-12-22 22:21:38 +0000
277+++ tests/functional/openlp_plugins/songs/test_presentationmanagerimport.py 2017-12-24 09:31:18 +0000
278@@ -25,7 +25,7 @@
279 from tests.helpers.songfileimport import SongImportTestHelper
280 from tests.utils.constants import RESOURCE_PATH
281
282-TEST_PATH = RESOURCE_PATH / 'presentationmanagersongs'
283+TEST_PATH = RESOURCE_PATH / 'songs' / 'presentationmanager'
284
285
286 class TestPresentationManagerFileImport(SongImportTestHelper):
287
288=== modified file 'tests/functional/openlp_plugins/songs/test_propresenterimport.py'
289--- tests/functional/openlp_plugins/songs/test_propresenterimport.py 2017-12-22 22:21:38 +0000
290+++ tests/functional/openlp_plugins/songs/test_propresenterimport.py 2017-12-24 09:31:18 +0000
291@@ -26,7 +26,7 @@
292 from tests.helpers.songfileimport import SongImportTestHelper
293 from tests.utils.constants import RESOURCE_PATH
294
295-TEST_PATH = RESOURCE_PATH / 'propresentersongs'
296+TEST_PATH = RESOURCE_PATH / 'songs' / 'propresenter'
297
298
299 class TestProPresenterFileImport(SongImportTestHelper):
300
301=== modified file 'tests/functional/openlp_plugins/songs/test_songbeamerimport.py'
302--- tests/functional/openlp_plugins/songs/test_songbeamerimport.py 2017-12-24 07:40:07 +0000
303+++ tests/functional/openlp_plugins/songs/test_songbeamerimport.py 2017-12-24 09:31:18 +0000
304@@ -31,7 +31,7 @@
305 from tests.helpers.songfileimport import SongImportTestHelper
306 from tests.utils.constants import RESOURCE_PATH
307
308-TEST_PATH = RESOURCE_PATH / 'songbeamersongs'
309+TEST_PATH = RESOURCE_PATH / 'songs' / 'songbeamer'
310
311
312 class TestSongBeamerFileImport(SongImportTestHelper):
313
314=== modified file 'tests/functional/openlp_plugins/songs/test_songproimport.py'
315--- tests/functional/openlp_plugins/songs/test_songproimport.py 2017-12-22 22:21:38 +0000
316+++ tests/functional/openlp_plugins/songs/test_songproimport.py 2017-12-24 09:31:18 +0000
317@@ -26,7 +26,7 @@
318 from tests.helpers.songfileimport import SongImportTestHelper
319 from tests.utils.constants import RESOURCE_PATH
320
321-TEST_PATH = RESOURCE_PATH / 'songprosongs'
322+TEST_PATH = RESOURCE_PATH / 'songs' / 'songpro'
323
324
325 class TestSongProFileImport(SongImportTestHelper):
326
327=== modified file 'tests/functional/openlp_plugins/songs/test_songselect.py'
328--- tests/functional/openlp_plugins/songs/test_songselect.py 2017-12-24 07:40:07 +0000
329+++ tests/functional/openlp_plugins/songs/test_songselect.py 2017-12-24 09:31:18 +0000
330@@ -38,7 +38,7 @@
331 from tests.helpers.testmixin import TestMixin
332 from tests.utils.constants import RESOURCE_PATH
333
334-TEST_PATH = RESOURCE_PATH / 'songselect'
335+TEST_PATH = RESOURCE_PATH / 'songs' / 'songselect'
336
337
338 class TestSongSelectImport(TestCase, TestMixin):
339
340=== modified file 'tests/functional/openlp_plugins/songs/test_songshowplusimport.py'
341--- tests/functional/openlp_plugins/songs/test_songshowplusimport.py 2017-12-24 07:40:07 +0000
342+++ tests/functional/openlp_plugins/songs/test_songshowplusimport.py 2017-12-24 09:31:18 +0000
343@@ -31,7 +31,7 @@
344 from tests.helpers.songfileimport import SongImportTestHelper
345 from tests.utils.constants import RESOURCE_PATH
346
347-TEST_PATH = RESOURCE_PATH / 'songshowplussongs'
348+TEST_PATH = RESOURCE_PATH / 'songs' / 'songshowplus'
349
350
351 class TestSongShowPlusFileImport(SongImportTestHelper):
352
353=== modified file 'tests/functional/openlp_plugins/songs/test_sundayplusimport.py'
354--- tests/functional/openlp_plugins/songs/test_sundayplusimport.py 2017-12-22 22:21:38 +0000
355+++ tests/functional/openlp_plugins/songs/test_sundayplusimport.py 2017-12-24 09:31:18 +0000
356@@ -26,7 +26,7 @@
357 from tests.helpers.songfileimport import SongImportTestHelper
358 from tests.utils.constants import RESOURCE_PATH
359
360-TEST_PATH = RESOURCE_PATH / 'sundayplussongs'
361+TEST_PATH = RESOURCE_PATH / 'songs' / 'sundayplus'
362
363
364 class TestSundayPlusFileImport(SongImportTestHelper):
365
366=== modified file 'tests/functional/openlp_plugins/songs/test_videopsalm.py'
367--- tests/functional/openlp_plugins/songs/test_videopsalm.py 2017-12-22 22:21:38 +0000
368+++ tests/functional/openlp_plugins/songs/test_videopsalm.py 2017-12-24 09:31:18 +0000
369@@ -26,7 +26,7 @@
370 from tests.helpers.songfileimport import SongImportTestHelper
371 from tests.utils.constants import RESOURCE_PATH
372
373-TEST_PATH = RESOURCE_PATH / 'videopsalmsongs'
374+TEST_PATH = RESOURCE_PATH / 'songs' / 'videopsalm'
375
376
377 class TestVideoPsalmFileImport(SongImportTestHelper):
378
379=== modified file 'tests/functional/openlp_plugins/songs/test_wordsofworshipimport.py'
380--- tests/functional/openlp_plugins/songs/test_wordsofworshipimport.py 2017-12-22 22:21:38 +0000
381+++ tests/functional/openlp_plugins/songs/test_wordsofworshipimport.py 2017-12-24 09:31:18 +0000
382@@ -25,7 +25,7 @@
383 from tests.helpers.songfileimport import SongImportTestHelper
384 from tests.utils.constants import RESOURCE_PATH
385
386-TEST_PATH = RESOURCE_PATH / 'wordsofworshipsongs'
387+TEST_PATH = RESOURCE_PATH / 'songs' / 'wordsofworship'
388
389
390 class TestWordsOfWorshipFileImport(SongImportTestHelper):
391
392=== modified file 'tests/functional/openlp_plugins/songs/test_worshipassistantimport.py'
393--- tests/functional/openlp_plugins/songs/test_worshipassistantimport.py 2017-12-24 07:33:22 +0000
394+++ tests/functional/openlp_plugins/songs/test_worshipassistantimport.py 2017-12-24 09:31:18 +0000
395@@ -26,7 +26,7 @@
396 from tests.helpers.songfileimport import SongImportTestHelper
397 from tests.utils.constants import RESOURCE_PATH
398
399-TEST_PATH = RESOURCE_PATH / 'worshipassistantsongs'
400+TEST_PATH = RESOURCE_PATH / 'songs' / 'worshipassistant'
401
402
403 class TestWorshipAssistantFileImport(SongImportTestHelper):
404
405=== modified file 'tests/functional/openlp_plugins/songs/test_zionworximport.py'
406--- tests/functional/openlp_plugins/songs/test_zionworximport.py 2017-12-24 07:40:07 +0000
407+++ tests/functional/openlp_plugins/songs/test_zionworximport.py 2017-12-24 09:31:18 +0000
408@@ -32,7 +32,7 @@
409 from tests.helpers.songfileimport import SongImportTestHelper
410 from tests.utils.constants import RESOURCE_PATH
411
412-TEST_PATH = RESOURCE_PATH / 'zionworxsongs'
413+TEST_PATH = RESOURCE_PATH / 'songs' / 'zionworx'
414
415
416 class TestZionWorxImport(TestCase):
417
418=== modified file 'tests/interfaces/openlp_core/common/test_utils.py'
419--- tests/interfaces/openlp_core/common/test_utils.py 2017-08-25 20:03:25 +0000
420+++ tests/interfaces/openlp_core/common/test_utils.py 2017-12-24 09:31:18 +0000
421@@ -25,8 +25,8 @@
422 from unittest import TestCase
423
424 from openlp.core.common import is_not_image_file
425-from openlp.core.common.path import Path
426-from tests.utils.constants import TEST_RESOURCES_PATH
427+
428+from tests.utils.constants import RESOURCE_PATH
429 from tests.helpers.testmixin import TestMixin
430
431
432@@ -59,10 +59,10 @@
433 Test the method handles an image file
434 """
435 # Given and empty string
436- file_name = Path(TEST_RESOURCES_PATH, 'church.jpg')
437+ file_path = RESOURCE_PATH / 'church.jpg'
438
439 # WHEN testing for it
440- result = is_not_image_file(file_name)
441+ result = is_not_image_file(file_path)
442
443 # THEN the result is false
444 assert result is False, 'The file is present so the test should return False'
445@@ -72,10 +72,10 @@
446 Test the method handles a non image file
447 """
448 # Given and empty string
449- file_name = Path(TEST_RESOURCES_PATH, 'serviceitem_custom_1.osj')
450+ file_path = RESOURCE_PATH / 'serviceitem_custom_1.osj'
451
452 # WHEN testing for it
453- result = is_not_image_file(file_name)
454+ result = is_not_image_file(file_path)
455
456 # THEN the result is false
457 assert result is True, 'The file is not an image file so the test should return True'
458
459=== renamed directory 'tests/resources/chordprosongs' => 'tests/resources/songs/chordpro'
460=== renamed directory 'tests/resources/easyslidessongs' => 'tests/resources/songs/easyslides'
461=== renamed directory 'tests/resources/easyworshipsongs' => 'tests/resources/songs/easyworship'
462=== renamed directory 'tests/resources/lyrixsongs' => 'tests/resources/songs/lyrix'
463=== renamed directory 'tests/resources/openlyricssongs' => 'tests/resources/songs/openlyrics'
464=== renamed directory 'tests/resources/opensongsongs' => 'tests/resources/songs/opensong'
465=== renamed directory 'tests/resources/opsprosongs' => 'tests/resources/songs/opspro'
466=== renamed directory 'tests/resources/powerpraisesongs' => 'tests/resources/songs/powerpraise'
467=== renamed directory 'tests/resources/presentationmanagersongs' => 'tests/resources/songs/presentationmanager'
468=== renamed directory 'tests/resources/propresentersongs' => 'tests/resources/songs/propresenter'
469=== renamed directory 'tests/resources/songbeamersongs' => 'tests/resources/songs/songbeamer'
470=== renamed directory 'tests/resources/songprosongs' => 'tests/resources/songs/songpro'
471=== renamed directory 'tests/resources/songselect' => 'tests/resources/songs/songselect'
472=== renamed directory 'tests/resources/songshowplussongs' => 'tests/resources/songs/songshowplus'
473=== renamed directory 'tests/resources/sundayplussongs' => 'tests/resources/songs/sundayplus'
474=== renamed directory 'tests/resources/videopsalmsongs' => 'tests/resources/songs/videopsalm'
475=== renamed directory 'tests/resources/wordsofworshipsongs' => 'tests/resources/songs/wordsofworship'
476=== renamed directory 'tests/resources/worshipassistantsongs' => 'tests/resources/songs/worshipassistant'
477=== renamed directory 'tests/resources/zionworxsongs' => 'tests/resources/songs/zionworx'