forked from openlp/openlp
Revert attempted fixes to projector tests. Just don't use windows...
This commit is contained in:
parent
7d2f2d147c
commit
e9410de13c
@ -32,7 +32,7 @@ record functions.
|
||||
|
||||
PREREQUISITE: add_record() and get_all() functions validated.
|
||||
"""
|
||||
import sys
|
||||
|
||||
from unittest import TestCase
|
||||
from tests.functional import MagicMock, patch
|
||||
|
||||
@ -85,11 +85,7 @@ class TestProjectorDB(TestCase):
|
||||
Set up anything necessary for all tests
|
||||
"""
|
||||
if not hasattr(self, 'projector'):
|
||||
# We need to patch this in different ways to make to work an all versions
|
||||
if sys.version_info > (3, 4, 0):
|
||||
mocked_init_url = patch('openlp.core.lib.db.init_url')
|
||||
else:
|
||||
mocked_init_url = patch('openlp.core.lib.projector.db.init_url')
|
||||
with patch('openlp.core.lib.projector.db.init_url') as mocked_init_url:
|
||||
mocked_init_url.start()
|
||||
mocked_init_url.return_value = 'sqlite:///%s' % tmpfile
|
||||
self.projector = ProjectorDB()
|
||||
|
@ -31,7 +31,6 @@ Interface tests to test the themeManager class and related methods.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from unittest import TestCase
|
||||
|
||||
from openlp.core.common import Registry, Settings
|
||||
@ -58,11 +57,7 @@ class TestProjectorManager(TestCase, TestMixin):
|
||||
self.setup_application()
|
||||
Registry.create()
|
||||
if not hasattr(self, 'projector_manager'):
|
||||
# We need to patch this in different ways to make to work an all versions
|
||||
if sys.version_info > (3, 4, 0):
|
||||
mocked_init_url = patch('openlp.core.lib.db.init_url')
|
||||
else:
|
||||
mocked_init_url = patch('openlp.core.lib.projector.db.init_url')
|
||||
with patch('openlp.core.lib.projector.db.init_url') as mocked_init_url:
|
||||
mocked_init_url.start()
|
||||
mocked_init_url.return_value = 'sqlite:///%s' % tmpfile
|
||||
self.projectordb = ProjectorDB()
|
||||
|
Loading…
Reference in New Issue
Block a user