Fix test db temp file for windows, projector edit form notes clearing

This commit is contained in:
Ken Roberts 2015-01-05 10:36:10 -08:00
parent ba66618ca0
commit 2e9f274027
2 changed files with 4 additions and 3 deletions

View File

@ -132,8 +132,7 @@ class Ui_ProjectorEditForm(object):
self.location_label.setText(translate('OpenLP.ProjectorEditForm', 'Location'))
self.location_text.setText(self.projector.location)
self.notes_label.setText(translate('OpenLP.ProjectorEditForm', 'Notes'))
self.notes_text.selectAll()
self.notes_text.cut()
self.notes_text.clear()
self.notes_text.insertPlainText(self.projector.notes)

View File

@ -32,6 +32,7 @@ class and methods.
"""
import os
import tempfile
from unittest import TestCase
from openlp.core.common import Registry, Settings
@ -42,7 +43,7 @@ from tests.functional import patch
from tests.helpers.testmixin import TestMixin
from tests.resources.projector.data import TEST1_DATA, TEST2_DATA
tmpfile = '/tmp/openlp-test-projectormanager.sql'
tmpfile = tempfile.mkstemp(prefix='openlp-test-projectormanager', suffix='.sql')[1]
class TestProjectorEditForm(TestCase, TestMixin):
@ -75,6 +76,7 @@ class TestProjectorEditForm(TestCase, TestMixin):
"""
self.projectordb.session.close()
del(self.projector_form)
os.remove(tmpfile)
self.destroy_settings()
def edit_form_add_projector_test(self):