~tomasgroth/openlp/portable-path

« back to all changes in this revision

Viewing changes to tests/functional/openlp_core/ui/test_thememanager.py

  • Committer: Tomas Groth
  • Date: 2019-04-30 19:02:42 UTC
  • mfrom: (2829.2.32 openlp)
  • Revision ID: tomasgroth@yahoo.dk-20190430190242-6zwjk8724tyux70m
trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
###############################################################################
5
5
# OpenLP - Open Source Lyrics Projection                                      #
6
6
# --------------------------------------------------------------------------- #
7
 
# Copyright (c) 2008-2017 OpenLP Developers                                   #
 
7
# Copyright (c) 2008-2019 OpenLP Developers                                   #
8
8
# --------------------------------------------------------------------------- #
9
9
# This program is free software; you can redistribute it and/or modify it     #
10
10
# under the terms of the GNU General Public License as published by the Free  #
32
32
 
33
33
from openlp.core.common.path import Path
34
34
from openlp.core.common.registry import Registry
35
 
from openlp.core.ui import ThemeManager
 
35
from openlp.core.ui.thememanager import ThemeManager
36
36
from tests.utils.constants import RESOURCE_PATH
37
37
 
38
38
 
66
66
        theme_manager._export_theme(Path('some', 'path', 'Default.otz'), 'Default')
67
67
 
68
68
        # THEN: The zipfile should be created at the given path
69
 
        mocked_zipfile_init.assert_called_with(os.path.join('some', 'path', 'Default.otz'), 'w')
70
 
        mocked_zipfile_write.assert_called_with(str(RESOURCE_PATH / 'themes' / 'Default' / 'Default.xml'),
71
 
                                                os.path.join('Default', 'Default.xml'))
 
69
        mocked_zipfile_init.assert_called_with(Path('some', 'path', 'Default.otz'), 'w')
 
70
        mocked_zipfile_write.assert_called_with(RESOURCE_PATH / 'themes' / 'Default' / 'Default.xml',
 
71
                                                Path('Default', 'Default.xml'))
72
72
 
73
73
    def test_initial_theme_manager(self):
74
74
        """